]> khamidou — GitHub mirrors - electron.git/commitdiff
Do not implement window.open.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 27 Dec 2013 06:32:24 +0000 (14:32 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 27 Dec 2013 06:32:24 +0000 (14:32 +0800)
browser/native_window.cc
browser/native_window.h

index ad7773327e6b3ccb46515233bcd7027de12f7c04..2411464a723c9c03c9350ba4f033b029cfb63efa 100644 (file)
@@ -280,24 +280,6 @@ void NativeWindow::NotifyWindowBlur() {
   FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowBlur());
 }
 
-// Window opened by window.open.
-void NativeWindow::WebContentsCreated(
-    content::WebContents* source_contents,
-    int64 source_frame_id,
-    const string16& frame_name,
-    const GURL& target_url,
-    content::WebContents* new_contents) {
-  LOG(WARNING) << "Please use node-style Window API to create window, "
-                  "using window.open has very strict constrains.";
-
-  scoped_ptr<base::DictionaryValue> options(new base::DictionaryValue);
-  options->SetInteger(switches::kWidth, 800);
-  options->SetInteger(switches::kHeight, 600);
-
-  NativeWindow* window = Create(new_contents, options.get());
-  window->InitFromOptions(options.get());
-}
-
 content::JavaScriptDialogManager* NativeWindow::GetJavaScriptDialogManager() {
   if (!dialog_manager_)
     dialog_manager_.reset(new AtomJavaScriptDialogManager);
index 5e1346138c9776e696780faf82c8d74067890e71..4978ef9bdb771cd5b7a11b4fdf26852a3fd10c03 100644 (file)
@@ -157,11 +157,6 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
       const std::vector<DraggableRegion>& regions) = 0;
 
   // Implementations of content::WebContentsDelegate.
-  virtual void WebContentsCreated(content::WebContents* source_contents,
-                                  int64 source_frame_id,
-                                  const string16& frame_name,
-                                  const GURL& target_url,
-                                  content::WebContents* new_contents) OVERRIDE;
   virtual content::JavaScriptDialogManager*
       GetJavaScriptDialogManager() OVERRIDE;
   virtual void BeforeUnloadFired(content::WebContents* tab,