Remove the CefBrowserHost::ParentWindowWillClose method that was added for modal dialog support but never implemented (issue #519).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1613 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
b76b207ec4
commit
769616da5f
|
@ -221,15 +221,6 @@ typedef struct _cef_browser_host_t {
|
|||
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Call this function before destroying a contained browser window. This
|
||||
// function performs any internal cleanup that may be needed before the
|
||||
// browser window is destroyed. See cef_life_span_handler_t::do_close()
|
||||
// documentation for additional usage information.
|
||||
///
|
||||
void (CEF_CALLBACK *parent_window_will_close)(
|
||||
struct _cef_browser_host_t* self);
|
||||
|
||||
///
|
||||
// Request that the browser close. The JavaScript 'onbeforeunload' event will
|
||||
// be fired. If |force_close| is false (0) the event handler, if any, will be
|
||||
|
|
|
@ -135,10 +135,8 @@ typedef struct _cef_life_span_handler_t {
|
|||
// CefJSDialogHandler::OnBeforeUnloadDialog()).
|
||||
// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6.
|
||||
// Application's do_close() handler is called. Application will:
|
||||
// A. Call CefBrowserHost::ParentWindowWillClose() to notify CEF that the
|
||||
// parent window will be closing.
|
||||
// B. Set a flag to indicate that the next close attempt will be allowed.
|
||||
// C. Return false.
|
||||
// A. Set a flag to indicate that the next close attempt will be allowed.
|
||||
// B. Return false.
|
||||
// 7. CEF sends an OS close notification. 8. Application's top-level window
|
||||
// receives the OS close notification and
|
||||
// allows the window to close based on the flag from #6B.
|
||||
|
|
|
@ -258,15 +258,6 @@ class CefBrowserHost : public virtual CefBase {
|
|||
/*--cef()--*/
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
|
||||
|
||||
///
|
||||
// Call this method before destroying a contained browser window. This method
|
||||
// performs any internal cleanup that may be needed before the browser window
|
||||
// is destroyed. See CefLifeSpanHandler::DoClose() documentation for
|
||||
// additional usage information.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void ParentWindowWillClose() =0;
|
||||
|
||||
///
|
||||
// Request that the browser close. The JavaScript 'onbeforeunload' event will
|
||||
// be fired. If |force_close| is false the event handler, if any, will be
|
||||
|
|
|
@ -135,10 +135,8 @@ class CefLifeSpanHandler : public virtual CefBase {
|
|||
// 4. User approves the close.
|
||||
// 5. JavaScript 'onunload' handler executes.
|
||||
// 6. Application's DoClose() handler is called. Application will:
|
||||
// A. Call CefBrowserHost::ParentWindowWillClose() to notify CEF that the
|
||||
// parent window will be closing.
|
||||
// B. Set a flag to indicate that the next close attempt will be allowed.
|
||||
// C. Return false.
|
||||
// A. Set a flag to indicate that the next close attempt will be allowed.
|
||||
// B. Return false.
|
||||
// 7. CEF sends an OS close notification.
|
||||
// 8. Application's top-level window receives the OS close notification and
|
||||
// allows the window to close based on the flag from #6B.
|
||||
|
|
|
@ -682,9 +682,6 @@ void CefBrowserHostImpl::CloseBrowser(bool force_close) {
|
|||
}
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::ParentWindowWillClose() {
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::SetFocus(bool enable) {
|
||||
if (!enable)
|
||||
return;
|
||||
|
|
|
@ -126,7 +126,6 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
|||
// CefBrowserHost methods.
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
||||
virtual void ParentWindowWillClose() OVERRIDE;
|
||||
virtual void SetFocus(bool enable) OVERRIDE;
|
||||
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
|
||||
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE;
|
||||
|
|
|
@ -112,18 +112,6 @@ cef_browser_t* CEF_CALLBACK browser_host_get_browser(
|
|||
return CefBrowserCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_parent_window_will_close(
|
||||
struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserHostCppToC::Get(self)->ParentWindowWillClose();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self,
|
||||
int force_close) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
@ -651,8 +639,6 @@ void CEF_CALLBACK browser_host_handle_key_event_after_text_input_client(
|
|||
CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
|
||||
: CefCppToC<CefBrowserHostCppToC, CefBrowserHost, cef_browser_host_t>(cls) {
|
||||
struct_.struct_.get_browser = browser_host_get_browser;
|
||||
struct_.struct_.parent_window_will_close =
|
||||
browser_host_parent_window_will_close;
|
||||
struct_.struct_.close_browser = browser_host_close_browser;
|
||||
struct_.struct_.set_focus = browser_host_set_focus;
|
||||
struct_.struct_.get_window_handle = browser_host_get_window_handle;
|
||||
|
|
|
@ -76,16 +76,6 @@ CefRefPtr<CefBrowser> CefBrowserHostCToCpp::GetBrowser() {
|
|||
return CefBrowserCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::ParentWindowWillClose() {
|
||||
if (CEF_MEMBER_MISSING(struct_, parent_window_will_close))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->parent_window_will_close(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::CloseBrowser(bool force_close) {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_browser))
|
||||
return;
|
||||
|
|
|
@ -38,7 +38,6 @@ class CefBrowserHostCToCpp
|
|||
|
||||
// CefBrowserHost methods
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual void ParentWindowWillClose() OVERRIDE;
|
||||
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
||||
virtual void SetFocus(bool enable) OVERRIDE;
|
||||
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
|
||||
|
|
|
@ -334,9 +334,6 @@ bool ClientHandler::DoClose(CefRefPtr<CefBrowser> browser) {
|
|||
// documentation in the CEF header for a detailed destription of this
|
||||
// process.
|
||||
if (m_BrowserId == browser->GetIdentifier()) {
|
||||
// Notify the browser that the parent window is about to close.
|
||||
browser->GetHost()->ParentWindowWillClose();
|
||||
|
||||
// Set a flag to indicate that the window close should be allowed.
|
||||
m_bIsClosing = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue