mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-18 21:20:39 +01:00
24 lines
964 B
Diff
24 lines
964 B
Diff
|
diff --git content/public/browser/frame_service_base.h content/public/browser/frame_service_base.h
|
||
|
index af3218d8f6462..da6880cc57e90 100644
|
||
|
--- content/public/browser/frame_service_base.h
|
||
|
+++ content/public/browser/frame_service_base.h
|
||
|
@@ -83,6 +83,8 @@ class FrameServiceBase : public Interface, public WebContentsObserver {
|
||
|
|
||
|
void DidFinishNavigation(NavigationHandle* navigation_handle) final {
|
||
|
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||
|
+ if (!ShouldCloseOnFinishNavigation())
|
||
|
+ return;
|
||
|
|
||
|
if (!navigation_handle->HasCommitted() ||
|
||
|
navigation_handle->IsSameDocument() ||
|
||
|
@@ -96,6 +98,9 @@ class FrameServiceBase : public Interface, public WebContentsObserver {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+ // Used for CEF bindings that outlive navigation.
|
||
|
+ virtual bool ShouldCloseOnFinishNavigation() const { return true; }
|
||
|
+
|
||
|
// Stops observing WebContents and delete |this|.
|
||
|
void Close() {
|
||
|
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|