Simply the closing model.
This commit is contained in:
parent
9f1fe4d2c2
commit
edd8410c24
4 changed files with 23 additions and 49 deletions
|
@ -62,6 +62,7 @@ class NativeWindow : public content::WebContentsDelegate,
|
|||
void InitFromOptions(base::DictionaryValue* options);
|
||||
|
||||
virtual void Close() = 0;
|
||||
virtual void CloseImmediately() = 0;
|
||||
virtual void Move(const gfx::Rect& pos) = 0;
|
||||
virtual void Focus(bool focus) = 0;
|
||||
virtual void Show() = 0;
|
||||
|
@ -94,13 +95,10 @@ class NativeWindow : public content::WebContentsDelegate,
|
|||
virtual void ShowDevTools();
|
||||
virtual void CloseDevTools();
|
||||
|
||||
// Close the web page in this window and then desctruct.
|
||||
virtual void RequestToDestroyWindow();
|
||||
|
||||
// Used by platform dependent code to determine whether the window can be
|
||||
// closed. A window can only be closed when the beforeunload handler
|
||||
// doesn't prevent it.
|
||||
bool CanClose();
|
||||
// The same with closing a tab in a real browser.
|
||||
//
|
||||
// Should be called by platform code when user want to close the window.
|
||||
virtual void CloseWebContents();
|
||||
|
||||
content::WebContents* GetWebContents() const;
|
||||
|
||||
|
@ -129,9 +127,6 @@ class NativeWindow : public content::WebContentsDelegate,
|
|||
virtual content::JavaScriptDialogManager*
|
||||
GetJavaScriptDialogManager() OVERRIDE;
|
||||
virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
||||
virtual void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) OVERRIDE;
|
||||
|
||||
// Implementations of content::WebContentsObserver.
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
|
@ -163,7 +158,6 @@ class NativeWindow : public content::WebContentsDelegate,
|
|||
scoped_ptr<brightray::InspectableWebContents> inspectable_web_contents_;
|
||||
|
||||
bool window_going_to_destroy_;
|
||||
bool can_destroy_window_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NativeWindow);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue