Do not implement window.open.
This commit is contained in:
parent
a2522efb25
commit
a60be1563f
2 changed files with 0 additions and 23 deletions
|
@ -280,24 +280,6 @@ void NativeWindow::NotifyWindowBlur() {
|
||||||
FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowBlur());
|
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() {
|
content::JavaScriptDialogManager* NativeWindow::GetJavaScriptDialogManager() {
|
||||||
if (!dialog_manager_)
|
if (!dialog_manager_)
|
||||||
dialog_manager_.reset(new AtomJavaScriptDialogManager);
|
dialog_manager_.reset(new AtomJavaScriptDialogManager);
|
||||||
|
|
|
@ -157,11 +157,6 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
|
||||||
const std::vector<DraggableRegion>& regions) = 0;
|
const std::vector<DraggableRegion>& regions) = 0;
|
||||||
|
|
||||||
// Implementations of content::WebContentsDelegate.
|
// 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*
|
virtual content::JavaScriptDialogManager*
|
||||||
GetJavaScriptDialogManager() OVERRIDE;
|
GetJavaScriptDialogManager() OVERRIDE;
|
||||||
virtual void BeforeUnloadFired(content::WebContents* tab,
|
virtual void BeforeUnloadFired(content::WebContents* tab,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue