mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -221,15 +221,6 @@ typedef struct _cef_browser_host_t {
|
|||||||
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
|
struct _cef_browser_t* (CEF_CALLBACK *get_browser)(
|
||||||
struct _cef_browser_host_t* self);
|
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
|
// 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
|
// 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()).
|
// CefJSDialogHandler::OnBeforeUnloadDialog()).
|
||||||
// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6.
|
// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 6.
|
||||||
// Application's do_close() handler is called. Application will:
|
// Application's do_close() handler is called. Application will:
|
||||||
// A. Call CefBrowserHost::ParentWindowWillClose() to notify CEF that the
|
// A. Set a flag to indicate that the next close attempt will be allowed.
|
||||||
// parent window will be closing.
|
// B. Return false.
|
||||||
// B. Set a flag to indicate that the next close attempt will be allowed.
|
|
||||||
// C. Return false.
|
|
||||||
// 7. CEF sends an OS close notification. 8. Application's top-level window
|
// 7. CEF sends an OS close notification. 8. Application's top-level window
|
||||||
// receives the OS close notification and
|
// receives the OS close notification and
|
||||||
// allows the window to close based on the flag from #6B.
|
// allows the window to close based on the flag from #6B.
|
||||||
|
@ -258,15 +258,6 @@ class CefBrowserHost : public virtual CefBase {
|
|||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
|
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
|
// Request that the browser close. The JavaScript 'onbeforeunload' event will
|
||||||
// be fired. If |force_close| is false the event handler, if any, will be
|
// 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.
|
// 4. User approves the close.
|
||||||
// 5. JavaScript 'onunload' handler executes.
|
// 5. JavaScript 'onunload' handler executes.
|
||||||
// 6. Application's DoClose() handler is called. Application will:
|
// 6. Application's DoClose() handler is called. Application will:
|
||||||
// A. Call CefBrowserHost::ParentWindowWillClose() to notify CEF that the
|
// A. Set a flag to indicate that the next close attempt will be allowed.
|
||||||
// parent window will be closing.
|
// B. Return false.
|
||||||
// B. Set a flag to indicate that the next close attempt will be allowed.
|
|
||||||
// C. Return false.
|
|
||||||
// 7. CEF sends an OS close notification.
|
// 7. CEF sends an OS close notification.
|
||||||
// 8. Application's top-level window receives the OS close notification and
|
// 8. Application's top-level window receives the OS close notification and
|
||||||
// allows the window to close based on the flag from #6B.
|
// 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) {
|
void CefBrowserHostImpl::SetFocus(bool enable) {
|
||||||
if (!enable)
|
if (!enable)
|
||||||
return;
|
return;
|
||||||
|
@ -126,7 +126,6 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
|||||||
// CefBrowserHost methods.
|
// CefBrowserHost methods.
|
||||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||||
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
||||||
virtual void ParentWindowWillClose() OVERRIDE;
|
|
||||||
virtual void SetFocus(bool enable) OVERRIDE;
|
virtual void SetFocus(bool enable) OVERRIDE;
|
||||||
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
|
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
|
||||||
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE;
|
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE;
|
||||||
|
@ -112,18 +112,6 @@ cef_browser_t* CEF_CALLBACK browser_host_get_browser(
|
|||||||
return CefBrowserCppToC::Wrap(_retval);
|
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,
|
void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self,
|
||||||
int force_close) {
|
int force_close) {
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
// 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)
|
CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
|
||||||
: CefCppToC<CefBrowserHostCppToC, CefBrowserHost, cef_browser_host_t>(cls) {
|
: CefCppToC<CefBrowserHostCppToC, CefBrowserHost, cef_browser_host_t>(cls) {
|
||||||
struct_.struct_.get_browser = browser_host_get_browser;
|
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_.close_browser = browser_host_close_browser;
|
||||||
struct_.struct_.set_focus = browser_host_set_focus;
|
struct_.struct_.set_focus = browser_host_set_focus;
|
||||||
struct_.struct_.get_window_handle = browser_host_get_window_handle;
|
struct_.struct_.get_window_handle = browser_host_get_window_handle;
|
||||||
|
@ -76,16 +76,6 @@ CefRefPtr<CefBrowser> CefBrowserHostCToCpp::GetBrowser() {
|
|||||||
return CefBrowserCToCpp::Wrap(_retval);
|
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) {
|
void CefBrowserHostCToCpp::CloseBrowser(bool force_close) {
|
||||||
if (CEF_MEMBER_MISSING(struct_, close_browser))
|
if (CEF_MEMBER_MISSING(struct_, close_browser))
|
||||||
return;
|
return;
|
||||||
|
@ -38,7 +38,6 @@ class CefBrowserHostCToCpp
|
|||||||
|
|
||||||
// CefBrowserHost methods
|
// CefBrowserHost methods
|
||||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||||
virtual void ParentWindowWillClose() OVERRIDE;
|
|
||||||
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
||||||
virtual void SetFocus(bool enable) OVERRIDE;
|
virtual void SetFocus(bool enable) OVERRIDE;
|
||||||
virtual CefWindowHandle GetWindowHandle() 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
|
// documentation in the CEF header for a detailed destription of this
|
||||||
// process.
|
// process.
|
||||||
if (m_BrowserId == browser->GetIdentifier()) {
|
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.
|
// Set a flag to indicate that the window close should be allowed.
|
||||||
m_bIsClosing = true;
|
m_bIsClosing = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user