mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Change popup default behavior with native parent (see issue #3294)
When using a Views-hosted browser window the client receives Views-related callbacks for popups and can thereby customize the Views-hosted popup behavior. When using an external parent window no Views-related callbacks are delivered and customization options are restricted to providing a new parent handle via OnBeforePopup. Consequently, we should default to a normal browser window in the external parent case instead of the very minimial Views-hosted default. To test (A): 1. Run `cefclient --use-default-popup --enable-chrome-runtime --use-native` 2. Select Tests > Popup Window 3. Get a normal Chrome browser window To test (B): 1. Run `cefclient --use-default-popup [--enable-chrome-runtime] [--use-views]` 2. Select Tests > Popup Window 3. Get a native or Views-hosted browser window with title bar only
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/browser/web_contents/web_contents_impl.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "extensions/browser/process_manager.h"
|
||||
#include "pdf/pdf_features.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
@@ -162,14 +161,6 @@ bool CefBrowserPlatformDelegateAlloy::
|
||||
return true;
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateAlloy::RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) {
|
||||
// Indicate that the view has an external parent (namely us). This setting is
|
||||
// required for proper focus handling on Windows and Linux.
|
||||
if (!IsViewsHosted() && render_view_host->GetWidget()->GetView())
|
||||
render_view_host->GetWidget()->GetView()->SetHasExternalParent(true);
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateAlloy::RenderViewReady() {
|
||||
ConfigureAutoResize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user