Update to Chromium revision 318e6f54 (#400326)

This commit is contained in:
Marshall Greenblatt
2016-06-20 18:59:23 -04:00
parent 66425def4a
commit 05ee60b7b4
78 changed files with 679 additions and 442 deletions

View File

@@ -1,8 +1,8 @@
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
index 54d6c4c..4a5268d 100644
index 2f7ff29..49389ce 100644
--- render_widget_host_view_guest.cc
+++ render_widget_host_view_guest.cc
@@ -212,6 +212,9 @@ void RenderWidgetHostViewGuest::Destroy() {
@@ -215,6 +215,9 @@ void RenderWidgetHostViewGuest::Destroy() {
}
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {

View File

@@ -1,5 +1,5 @@
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
index 71e2857..73d4e45 100644
index 826c644..f52fd25 100644
--- browser/browser_plugin/browser_plugin_guest.cc
+++ browser/browser_plugin/browser_plugin_guest.cc
@@ -28,7 +28,7 @@
@@ -11,7 +11,7 @@ index 71e2857..73d4e45 100644
#include "content/common/browser_plugin/browser_plugin_constants.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
#include "content/common/content_constants_internal.h"
@@ -287,20 +287,19 @@ void BrowserPluginGuest::InitInternal(
@@ -289,20 +289,19 @@ void BrowserPluginGuest::InitInternal(
guest_window_rect_ = params.view_rect;
if (owner_web_contents_ != owner_web_contents) {
@@ -36,7 +36,7 @@ index 71e2857..73d4e45 100644
}
RendererPreferences* renderer_prefs =
@@ -750,11 +749,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -755,11 +754,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
->GetWidget()
->Init();
GetWebContents()->GetMainFrame()->Init();

View File

@@ -1,79 +1,29 @@
diff --git web_contents_impl.cc web_contents_impl.cc
index 5621f82..3124d00 100644
index 7754791..8aebfcd 100644
--- web_contents_impl.cc
+++ web_contents_impl.cc
@@ -1510,39 +1510,47 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
// frame - let's do the same thing here.
@@ -1498,6 +1498,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name = params.main_frame_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
+
+ if (params.view && params.delegate_view) {
+ view_.reset(params.view);
+ render_view_host_delegate_view_ = params.delegate_view;
+ }
- WebContentsViewDelegate* delegate =
- GetContentClient()->browser()->GetWebContentsViewDelegate(this);
+ if (!view_) {
+ WebContentsViewDelegate* delegate =
+ GetContentClient()->browser()->GetWebContentsViewDelegate(this);
#if defined(MOJO_SHELL_CLIENT)
- if (MojoShellConnection::Get() &&
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseMusInRenderer)) {
- mus::Window* mus_window = aura::GetMusWindow(params.context);
- if (mus_window) {
- view_.reset(new WebContentsViewMus(mus_window, this, delegate,
- &render_view_host_delegate_view_));
+ if (MojoShellConnection::Get() &&
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseMusInRenderer)) {
+ mus::Window* mus_window = aura::GetMusWindow(params.context);
+ if (mus_window) {
+ view_.reset(new WebContentsViewMus(mus_window, this, delegate,
+ &render_view_host_delegate_view_));
+ }
}
- }
#endif
- if (!view_) {
+ if (!view_) {
+ if (browser_plugin_guest_ &&
+ BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
+ view_.reset(new WebContentsViewChildFrame(
+ this, delegate, &render_view_host_delegate_view_));
+ } else {
+ view_.reset(CreateWebContentsView(this, delegate,
+ &render_view_host_delegate_view_));
+ }
+ }
+
if (browser_plugin_guest_ &&
- BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
- view_.reset(new WebContentsViewChildFrame(
- this, delegate, &render_view_host_delegate_view_));
- } else {
- view_.reset(CreateWebContentsView(this, delegate,
- &render_view_host_delegate_view_));
+ !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
+ view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(),
+ std::move(view_),
+ &render_view_host_delegate_view_));
}
}
+ if (!view_) {
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
- if (browser_plugin_guest_ &&
- !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
- view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(),
- std::move(view_),
- &render_view_host_delegate_view_));
- }
@@ -1530,6 +1536,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::move(view_),
&render_view_host_delegate_view_));
}
+ }
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -1974,11 +1982,14 @@ void WebContentsImpl::CreateNewWindow(
@@ -1973,11 +1980,14 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@@ -89,7 +39,7 @@ index 5621f82..3124d00 100644
if (route_id != MSG_ROUTING_NONE &&
!RenderViewHost::FromID(render_process_id, route_id)) {
// If the embedder didn't create a WebContents for this route, we need to
@@ -2002,6 +2013,8 @@ void WebContentsImpl::CreateNewWindow(
@@ -2001,6 +2011,8 @@ void WebContentsImpl::CreateNewWindow(
create_params.opener_render_process_id = render_process_id;
create_params.opener_render_frame_id = params.opener_render_frame_id;
create_params.opener_suppressed = params.opener_suppressed;

View File

@@ -1,5 +1,5 @@
diff --git common.gypi common.gypi
index 3724f2f..5eb9cde 100644
index 203247d..2991dfc 100644
--- common.gypi
+++ common.gypi
@@ -9,6 +9,9 @@

View File

@@ -1,8 +1,8 @@
diff --git ui/browser.cc ui/browser.cc
index e551474..222b6ad 100644
index 14a9336..6f26daf 100644
--- ui/browser.cc
+++ ui/browser.cc
@@ -1731,7 +1731,9 @@ bool Browser::ShouldCreateWebContents(
@@ -1614,7 +1614,9 @@ bool Browser::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@@ -14,7 +14,7 @@ index e551474..222b6ad 100644
// If a BackgroundContents is created, suppress the normal WebContents.
return !MaybeCreateBackgroundContents(
diff --git ui/browser.h ui/browser.h
index 2196898..af9df43 100644
index 01f2880..e741e21 100644
--- ui/browser.h
+++ ui/browser.h
@@ -616,7 +616,9 @@ class Browser : public TabStripModelObserver,

View File

@@ -1,8 +1,8 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index ea713fd..e4119f6 100644
index 6fdb92e..5405306 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -188,6 +188,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@@ -184,6 +184,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
std::unique_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
@@ -14,7 +14,7 @@ index ea713fd..e4119f6 100644
+ }
+
#if defined(MOJO_RUNNER_CLIENT)
if (IsRunningInMojoShell()) {
if (shell::ShellIsRemote()) {
return std::unique_ptr<cc::SoftwareOutputDevice>(
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index a6245da..edfdeb5c 100644

View File

@@ -19,10 +19,10 @@ index 4ad49c8..f1fa7ab 100644
return false;
}
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index d96adc9..348ae16 100644
index 579335b..2248549 100644
--- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h
@@ -200,7 +200,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -201,7 +201,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
@@ -30,7 +30,7 @@ index d96adc9..348ae16 100644
// TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351
@@ -216,6 +215,7 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -217,6 +216,7 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationPolicy default_policy,
bool is_redirect);
@@ -39,10 +39,10 @@ index d96adc9..348ae16 100644
// built in media player for the given |url|. Defaults to false.
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
index 4ff6aaa..4309775 100644
index 5f3ab60..b6f503f 100644
--- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc
@@ -4771,7 +4771,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4867,7 +4867,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
(pending_navigation_params_ &&
!pending_navigation_params_->request_params.redirects.empty());
@@ -50,7 +50,7 @@ index 4ff6aaa..4309775 100644
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (GetContentClient()->renderer()->HandleNavigation(
@@ -4780,7 +4779,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4876,7 +4875,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
is_redirect)) {
return blink::WebNavigationPolicyIgnore;
}

View File

@@ -1,5 +1,5 @@
diff --git browser/guest_view/extension_options/extension_options_guest.cc browser/guest_view/extension_options/extension_options_guest.cc
index eb8eb4d..836ce55 100644
index 85bd364..60e936c 100644
--- browser/guest_view/extension_options/extension_options_guest.cc
+++ browser/guest_view/extension_options/extension_options_guest.cc
@@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(

View File

@@ -1,5 +1,5 @@
diff --git resource_ids resource_ids
index 5c46a26..b0babb3 100644
index bac636f2..979a58f0 100644
--- resource_ids
+++ resource_ids
@@ -14,6 +14,12 @@
@@ -14,4 +14,4 @@ index 5c46a26..b0babb3 100644
+ },
"chrome/browser/browser_resources.grd": {
"includes": [400],
"structures": [750],
"structures": [850],

View File

@@ -1,17 +0,0 @@
diff --git message_loop.cc message_loop.cc
index 3fef91b..58ddbf3 100644
--- message_loop.cc
+++ message_loop.cc
@@ -142,12 +142,6 @@ MessageLoop::~MessageLoop() {
// may be current.
DCHECK((pump_ && current() == this) || (!pump_ && current() != this));
- // iOS just attaches to the loop, it doesn't Run it.
- // TODO(stuartmorgan): Consider wiring up a Detach().
-#if !defined(OS_IOS)
- DCHECK(!run_loop_);
-#endif
-
#if defined(OS_WIN)
if (in_high_res_mode_)
Time::ActivateHighResolutionTimer(false);

View File

@@ -0,0 +1,106 @@
diff --git message_loop.cc message_loop.cc
index 2d6e2a5..7509494 100644
--- message_loop.cc
+++ message_loop.cc
@@ -143,12 +143,6 @@ MessageLoop::~MessageLoop() {
// may be current.
DCHECK((pump_ && current() == this) || (!pump_ && current() != this));
- // iOS just attaches to the loop, it doesn't Run it.
- // TODO(stuartmorgan): Consider wiring up a Detach().
-#if !defined(OS_IOS)
- DCHECK(!run_loop_);
-#endif
-
#if defined(OS_WIN)
if (in_high_res_mode_)
Time::ActivateHighResolutionTimer(false);
@@ -390,6 +384,9 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
in_high_res_mode_(false),
#endif
nestable_tasks_allowed_(true),
+#if defined(OS_WIN)
+ os_modal_loop_(false),
+#endif // OS_WIN
pump_factory_(pump_factory),
message_histogram_(NULL),
run_loop_(NULL),
diff --git message_loop.h message_loop.h
index 11d8712..bddc532 100644
--- message_loop.h
+++ message_loop.h
@@ -373,6 +373,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
void AddTaskObserver(TaskObserver* task_observer);
void RemoveTaskObserver(TaskObserver* task_observer);
+#if defined(OS_WIN)
+ void set_os_modal_loop(bool os_modal_loop) {
+ os_modal_loop_ = os_modal_loop;
+ }
+
+ bool os_modal_loop() const {
+ return os_modal_loop_;
+ }
+#endif // OS_WIN
+
// Can only be called from the thread that owns the MessageLoop.
bool is_running() const;
@@ -511,6 +521,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// insider a (accidentally induced?) nested message pump.
bool nestable_tasks_allowed_;
+#if defined(OS_WIN)
+ // Should be set to true before calling Windows APIs like TrackPopupMenu, etc.
+ // which enter a modal message loop.
+ bool os_modal_loop_;
+#endif
+
// pump_factory_.Run() is called to create a message pump for this loop
// if type_ is TYPE_CUSTOM and pump_ is null.
MessagePumpFactoryCallback pump_factory_;
diff --git message_pump_win.cc message_pump_win.cc
index 499d2d8..9002e15 100644
--- message_pump_win.cc
+++ message_pump_win.cc
@@ -474,20 +474,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
}
bool MessagePumpForUI::ProcessPumpReplacementMessage() {
- // When we encounter a kMsgHaveWork message, this method is called to peek and
- // process a replacement message. The goal is to make the kMsgHaveWork as non-
- // intrusive as possible, even though a continuous stream of such messages are
- // posted. This method carefully peeks a message while there is no chance for
- // a kMsgHaveWork to be pending, then resets the |have_work_| flag (allowing a
- // replacement kMsgHaveWork to possibly be posted), and finally dispatches
- // that peeked replacement. Note that the re-post of kMsgHaveWork may be
- // asynchronous to this thread!!
-
+ // When we encounter a kMsgHaveWork message, this method is called to peek
+ // and process a replacement message, such as a WM_PAINT or WM_TIMER. The
+ // goal is to make the kMsgHaveWork as non-intrusive as possible, even though
+ // a continuous stream of such messages are posted. This method carefully
+ // peeks a message while there is no chance for a kMsgHaveWork to be pending,
+ // then resets the have_work_ flag (allowing a replacement kMsgHaveWork to
+ // possibly be posted), and finally dispatches that peeked replacement. Note
+ // that the re-post of kMsgHaveWork may be asynchronous to this thread!!
+
+ bool have_message = false;
MSG msg;
- const bool have_message =
- g_peek_message(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE;
+ // We should not process all window messages if we are in the context of an
+ // OS modal loop, i.e. in the context of a windows API call like MessageBox.
+ // This is to ensure that these messages are peeked out by the OS modal loop.
+ if (MessageLoop::current()->os_modal_loop()) {
+ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above.
+ have_message = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) ||
+ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE);
+ } else {
+ have_message = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE;
+ }
- // Expect no message or a message different than kMsgHaveWork.
DCHECK(!have_message || kMsgHaveWork != msg.message ||
msg.hwnd != message_hwnd_);

View File

@@ -1,8 +1,8 @@
diff --git base/network_delegate.h base/network_delegate.h
index 81d8190..3405e31 100644
index 2deb9c58..0896a36 100644
--- base/network_delegate.h
+++ base/network_delegate.h
@@ -35,6 +35,7 @@ namespace net {
@@ -36,6 +36,7 @@ namespace net {
// of net/base here, because we have a net_base library. Forward declarations
// are ok.
class CookieOptions;
@@ -10,7 +10,7 @@ index 81d8190..3405e31 100644
class HttpRequestHeaders;
class HttpResponseHeaders;
class ProxyInfo;
@@ -109,6 +110,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
@@ -111,6 +112,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const GURL& target_url,
const GURL& referrer_url) const;
@@ -45,10 +45,10 @@ index 78b8c34..387bea5 100644
friend class GZipUnitTest;
friend class SdchFilterChainingTest;
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
index 63edfe3..8ab84cc 100644
index b9c8646..f1ed586 100644
--- url_request/url_request_job.cc
+++ url_request/url_request_job.cc
@@ -448,6 +448,9 @@ void URLRequestJob::NotifyHeadersComplete() {
@@ -444,6 +444,9 @@ void URLRequestJob::NotifyHeadersComplete() {
if (request_->status().is_success())
filter_ = SetupFilter();

View File

@@ -1,8 +1,8 @@
diff --git url_request.h url_request.h
index eb94da8..e4a9370 100644
index a4dba71..bde4569 100644
--- url_request.h
+++ url_request.h
@@ -659,10 +659,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
@@ -648,10 +648,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// or after the response headers are received.
void GetConnectionAttempts(ConnectionAttempts* out) const;

View File

@@ -1,8 +1,8 @@
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index 020ff8d..e4c5d9a 100644
index 43ca318..ca42502 100644
--- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp
@@ -19,6 +19,7 @@
@@ -20,6 +20,7 @@
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/fsdk_rendercontext.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
@@ -10,7 +10,7 @@ index 020ff8d..e4c5d9a 100644
#include "public/fpdf_ext.h"
#include "public/fpdf_progressive.h"
#include "third_party/base/numerics/safe_conversions_impl.h"
@@ -267,6 +268,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
@@ -291,6 +292,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
#endif // PDF_ENABLE_XFA
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@@ -1,8 +1,8 @@
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
index 3a1b8fb..927061c 100644
index c58e881..ccce3c1 100644
--- public/common/common_param_traits_macros.h
+++ public/common/common_param_traits_macros.h
@@ -207,6 +207,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@@ -208,6 +208,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@@ -11,10 +11,10 @@ index 3a1b8fb..927061c 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
index a0bc6f1..96d1478 100644
index 21411ea..2555544 100644
--- public/common/web_preferences.cc
+++ public/common/web_preferences.cc
@@ -163,6 +163,7 @@ WebPreferences::WebPreferences()
@@ -167,6 +167,7 @@ WebPreferences::WebPreferences()
pinch_overlay_scrollbar_thickness(0),
use_solid_color_scrollbars(false),
navigate_on_drag_drop(true),
@@ -23,10 +23,10 @@ index a0bc6f1..96d1478 100644
inert_visual_viewport(false),
record_whole_document(false),
diff --git public/common/web_preferences.h public/common/web_preferences.h
index 54b8ed4..160991f 100644
index b30f22a9..7779d08 100644
--- public/common/web_preferences.h
+++ public/common/web_preferences.h
@@ -176,6 +176,7 @@ struct CONTENT_EXPORT WebPreferences {
@@ -178,6 +178,7 @@ struct CONTENT_EXPORT WebPreferences {
int pinch_overlay_scrollbar_thickness;
bool use_solid_color_scrollbars;
bool navigate_on_drag_drop;
@@ -35,10 +35,10 @@ index 54b8ed4..160991f 100644
bool inert_visual_viewport;
bool record_whole_document;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index 71c52a3..cef247f 100644
index bec4737..ea6262b 100644
--- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc
@@ -1475,6 +1475,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1468,6 +1468,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);

View File

@@ -136,7 +136,7 @@ index 705211b..a524333 100644
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
-#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git printing/renderer/print_web_view_helper.cc printing/renderer/print_web_view_helper.cc
index cfb1c77..33dad1a 100644
index fa79d1a..3cf2f1d 100644
--- printing/renderer/print_web_view_helper.cc
+++ printing/renderer/print_web_view_helper.cc
@@ -83,6 +83,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
@@ -241,7 +241,7 @@ index cfb1c77..33dad1a 100644
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
SetScriptedPrintBlocked)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -984,7 +973,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
@@ -988,7 +977,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
}
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -249,7 +249,7 @@ index cfb1c77..33dad1a 100644
void PrintWebViewHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1);
@@ -1049,7 +1037,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
@@ -1053,7 +1041,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT);
}
}
@@ -257,7 +257,7 @@ index cfb1c77..33dad1a 100644
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1074,7 +1061,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
@@ -1078,7 +1065,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@@ -265,7 +265,7 @@ index cfb1c77..33dad1a 100644
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
return;
@@ -1235,7 +1221,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
@@ -1239,7 +1225,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
return true;
}
@@ -274,7 +274,7 @@ index cfb1c77..33dad1a 100644
bool PrintWebViewHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -1264,7 +1250,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -1269,7 +1255,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
@@ -283,7 +283,7 @@ index cfb1c77..33dad1a 100644
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_);
@@ -1294,7 +1280,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
@@ -1299,7 +1285,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true;
}
@@ -291,7 +291,7 @@ index cfb1c77..33dad1a 100644
void PrintWebViewHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1309,7 +1294,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
@@ -1314,7 +1299,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
is_scripted_printing_blocked_ = blocked;
}
@@ -299,7 +299,7 @@ index cfb1c77..33dad1a 100644
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
if (ipc_nesting_level_ > 1)
return;
@@ -1320,7 +1304,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1325,7 +1309,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.isNull()) {
@@ -309,7 +309,7 @@ index cfb1c77..33dad1a 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1328,7 +1314,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1333,7 +1319,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
@@ -317,7 +317,7 @@ index cfb1c77..33dad1a 100644
bool PrintWebViewHelper::IsPrintingEnabled() {
bool result = false;
@@ -1354,11 +1339,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
@@ -1359,11 +1344,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
// its |context_menu_node_|.
@@ -330,7 +330,7 @@ index cfb1c77..33dad1a 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
blink::WebNode duplicate_node(node);
@@ -1424,7 +1407,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1429,7 +1412,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@@ -338,7 +338,7 @@ index cfb1c77..33dad1a 100644
case FAIL_PREVIEW:
int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@@ -1436,7 +1418,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1441,7 +1423,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
print_preview_context_.Failed(notify_browser_of_print_failure_);
break;
@@ -346,7 +346,7 @@ index cfb1c77..33dad1a 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1568,7 +1549,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1573,7 +1554,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@@ -354,7 +354,7 @@ index cfb1c77..33dad1a 100644
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1677,7 +1657,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
@@ -1682,7 +1662,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
return true;
}
@@ -362,7 +362,7 @@ index cfb1c77..33dad1a 100644
#if defined(ENABLE_BASIC_PRINTING)
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
@@ -1785,7 +1764,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1790,7 +1769,6 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
@@ -370,7 +370,7 @@ index cfb1c77..33dad1a 100644
if (params.params.display_header_footer) {
// TODO(thestig): Figure out why Linux needs this. It is almost certainly
// |printingMinimumShrinkFactor| from Blink.
@@ -1800,7 +1778,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1805,7 +1783,6 @@ void PrintWebViewHelper::PrintPageInternal(
scale_factor / fudge_factor, page_layout_in_points,
params.params);
}
@@ -378,7 +378,7 @@ index cfb1c77..33dad1a 100644
float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area,
@@ -1836,7 +1813,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
@@ -1841,7 +1818,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
return true;
}
@@ -386,7 +386,7 @@ index cfb1c77..33dad1a 100644
void PrintWebViewHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -1964,7 +1940,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
@@ -1969,7 +1945,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true;
}
@@ -395,7 +395,7 @@ index cfb1c77..33dad1a 100644
PrintWebViewHelper::PrintPreviewContext::PrintPreviewContext()
: total_page_count_(0),
diff --git printing/renderer/print_web_view_helper.h printing/renderer/print_web_view_helper.h
index 7232b22..d2833f8 100644
index fe33d5e..3f1b7b5 100644
--- printing/renderer/print_web_view_helper.h
+++ printing/renderer/print_web_view_helper.h
@@ -137,9 +137,7 @@ class PrintWebViewHelper
@@ -408,7 +408,7 @@ index 7232b22..d2833f8 100644
};
enum PrintPreviewErrorBuckets {
@@ -173,10 +171,8 @@ class PrintWebViewHelper
@@ -174,10 +172,8 @@ class PrintWebViewHelper
void OnPrintForSystemDialog();
void OnPrintForPrintPreview(const base::DictionaryValue& job_settings);
#endif // defined(ENABLE_BASIC_PRINTING)
@@ -419,7 +419,7 @@ index 7232b22..d2833f8 100644
void OnPrintingDone(bool success);
// Get |page_size| and |content_area| information from
@@ -189,7 +185,6 @@ class PrintWebViewHelper
@@ -190,7 +186,6 @@ class PrintWebViewHelper
// Update |ignore_css_margins_| based on settings.
void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings);
@@ -427,7 +427,7 @@ index 7232b22..d2833f8 100644
// Prepare frame for creating preview document.
void PrepareFrameForPreviewDocument();
@@ -206,7 +201,6 @@ class PrintWebViewHelper
@@ -207,7 +202,6 @@ class PrintWebViewHelper
// Finalize the print ready preview document.
bool FinalizePrintReadyDocument();
@@ -435,7 +435,7 @@ index 7232b22..d2833f8 100644
// Enable/Disable window.print calls. If |blocked| is true window.print
// calls will silently fail. Call with |blocked| set to false to reenable.
@@ -235,7 +229,6 @@ class PrintWebViewHelper
@@ -236,7 +230,6 @@ class PrintWebViewHelper
const blink::WebNode& node,
int* number_of_pages);
@@ -443,7 +443,7 @@ index 7232b22..d2833f8 100644
// Set options for print preset from source PDF document.
bool SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options);
@@ -246,7 +239,6 @@ class PrintWebViewHelper
@@ -247,7 +240,6 @@ class PrintWebViewHelper
bool UpdatePrintSettings(blink::WebLocalFrame* frame,
const blink::WebNode& node,
const base::DictionaryValue& passed_job_settings);
@@ -451,7 +451,7 @@ index 7232b22..d2833f8 100644
// Get final print settings from the user.
// Return false if the user cancels or on error.
@@ -321,7 +313,6 @@ class PrintWebViewHelper
@@ -322,7 +314,6 @@ class PrintWebViewHelper
const PrintMsg_PrintPages_Params& params,
int page_count);
@@ -459,7 +459,7 @@ index 7232b22..d2833f8 100644
// Given the |device| and |canvas| to draw on, prints the appropriate headers
// and footers using strings from |header_footer_info| on to the canvas.
static void PrintHeaderAndFooter(blink::WebCanvas* canvas,
@@ -331,7 +322,6 @@ class PrintWebViewHelper
@@ -332,7 +323,6 @@ class PrintWebViewHelper
float webkit_scale_factor,
const PageSizeMargins& page_layout_in_points,
const PrintMsg_Print_Params& params);
@@ -467,7 +467,7 @@ index 7232b22..d2833f8 100644
bool GetPrintFrame(blink::WebLocalFrame** frame);
@@ -343,7 +333,6 @@ class PrintWebViewHelper
@@ -344,7 +334,6 @@ class PrintWebViewHelper
bool IsScriptInitiatedPrintAllowed(blink::WebFrame* frame,
bool user_initiated);
@@ -475,7 +475,7 @@ index 7232b22..d2833f8 100644
// Shows scripted print preview when options from plugin are available.
void ShowScriptedPrintPreview();
@@ -359,7 +348,6 @@ class PrintWebViewHelper
@@ -360,7 +349,6 @@ class PrintWebViewHelper
// |metafile| is the rendered page. Otherwise |metafile| is NULL.
// Returns true if print preview should continue, false on failure.
bool PreviewPageRendered(int page_number, PdfMetafileSkia* metafile);
@@ -483,7 +483,7 @@ index 7232b22..d2833f8 100644
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
@@ -512,6 +500,7 @@ class PrintWebViewHelper
@@ -513,6 +501,7 @@ class PrintWebViewHelper
ScriptingThrottler scripting_throttler_;
bool print_node_in_progress_;
@@ -492,7 +492,7 @@ index 7232b22..d2833f8 100644
bool is_loading_;
bool is_scripted_preview_delayed_;
diff --git printing/renderer/print_web_view_helper_mac.mm printing/renderer/print_web_view_helper_mac.mm
index 1d23d5b..e99373b 100644
index d227c5e..f362093 100644
--- printing/renderer/print_web_view_helper_mac.mm
+++ printing/renderer/print_web_view_helper_mac.mm
@@ -68,7 +68,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -503,7 +503,7 @@ index 1d23d5b..e99373b 100644
bool PrintWebViewHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -104,7 +103,6 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -105,7 +104,6 @@ bool PrintWebViewHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
@@ -511,7 +511,7 @@ index 1d23d5b..e99373b 100644
void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
int page_number,
@@ -139,14 +137,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
@@ -140,14 +138,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsPreviewMetafile(*canvas, is_preview);

View File

@@ -1,20 +1,20 @@
diff --git web_contents.cc web_contents.cc
index 69190cf..05d2250 100644
index fa0afb5..d677b31 100644
--- web_contents.cc
+++ web_contents.cc
@@ -28,7 +28,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
initially_hidden(false),
@@ -29,7 +29,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
guest_delegate(nullptr),
context(nullptr),
- renderer_initiated_creation(false) {}
+ renderer_initiated_creation(false),
renderer_initiated_creation(false),
- initialize_renderer(false) {
+ initialize_renderer(false),
+ view(nullptr),
+ delegate_view(nullptr) {}
+ delegate_view(nullptr) {
}
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git web_contents.h web_contents.h
index 6aa00e6..41223fa 100644
index 90b647e..9fcedc0 100644
--- web_contents.h
+++ web_contents.h
@@ -55,8 +55,10 @@ class PageState;
@@ -28,10 +28,10 @@ index 6aa00e6..41223fa 100644
struct CustomContextMenuContext;
struct DropData;
struct Manifest;
@@ -149,6 +151,10 @@ class WebContents : public PageNavigator,
// RenderFrame, have already been created on the renderer side, and
// WebContents construction should take this into account.
bool renderer_initiated_creation;
@@ -157,6 +159,10 @@ class WebContents : public PageNavigator,
// Note that the pre-created renderer process may not be used if the first
// navigation requires a dedicated or privileged process, such as a WebUI.
bool initialize_renderer;
+
+ // Optionally specify the view and delegate view.
+ content::WebContentsView* view;
@@ -55,7 +55,7 @@ index df97348..8e2168e 100644
}
diff --git web_contents_delegate.h web_contents_delegate.h
index 74b56e1..b4dcb2a 100644
index 2816c4d..387821f 100644
--- web_contents_delegate.h
+++ web_contents_delegate.h
@@ -42,9 +42,11 @@ class JavaScriptDialogManager;

View File

@@ -1,8 +1,8 @@
diff --git render_view_host_impl.h render_view_host_impl.h
index d54b2d7..c696c6f 100644
index 495ee21..952ddc8 100644
--- render_view_host_impl.h
+++ render_view_host_impl.h
@@ -193,6 +193,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
@@ -196,6 +196,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
void set_is_swapped_out(bool is_swapped_out) {
is_swapped_out_ = is_swapped_out;
}

View File

@@ -1,8 +1,8 @@
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
index 86481a9..e2e56c0 100644
index 68b3476..5fd78d0 100644
--- render_widget_host_view_mac.mm
+++ render_widget_host_view_mac.mm
@@ -572,9 +572,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
@@ -575,9 +575,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
// Paint this view host with |background_color_| when there is no content
// ready to draw.
background_layer_.reset([[CALayer alloc] init]);

View File

@@ -1,9 +1,9 @@
diff --git os_exchange_data_provider_aurax11.cc os_exchange_data_provider_aurax11.cc
index e2bba47..ea698fa3 100644
index 6048670..b37f4bf 100644
--- os_exchange_data_provider_aurax11.cc
+++ os_exchange_data_provider_aurax11.cc
@@ -159,7 +159,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
format_map_.Insert(atom_cache_.GetAtom(kMimeTypeMozillaURL), mem);
@@ -158,7 +158,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
mem);
// Set a string fallback as well.
- SetString(spec);

View File

@@ -1,8 +1,8 @@
diff --git controls/button/menu_button.cc controls/button/menu_button.cc
index 3602b45..ec83c86 100644
index 20b3452..ec73e01 100644
--- controls/button/menu_button.cc
+++ controls/button/menu_button.cc
@@ -199,7 +199,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
@@ -195,7 +195,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
gfx::Size MenuButton::GetPreferredSize() const {
gfx::Size prefsize = LabelButton::GetPreferredSize();
if (show_menu_marker_) {
@@ -11,7 +11,7 @@ index 3602b45..ec83c86 100644
kMenuMarkerPaddingRight,
0);
}
@@ -329,7 +329,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
@@ -324,7 +324,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
gfx::Size s = size();
if (show_menu_marker_) {
@@ -20,7 +20,7 @@ index 3602b45..ec83c86 100644
kMenuMarkerPaddingRight);
}
@@ -415,4 +415,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
@@ -412,4 +412,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
return monitor_bounds.right() - 1;
}

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index c33e325c..04ad7d9 100644
index f65febf0..9ffc653 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -695,6 +695,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
@@ -770,6 +770,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
}
}
#endif
@@ -17,19 +17,19 @@ index c33e325c..04ad7d9 100644
if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index dd88fae..0aaaf78 100644
index c4b9d14..c8f8cb2 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -40,6 +40,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
current_device_scale_factor_(0),
@@ -42,6 +42,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
current_display_rotation_(display::Display::ROTATE_0),
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
text_input_manager_(nullptr),
+ has_external_parent_(false),
renderer_frame_number_(0),
weak_factory_(this) {}
@@ -250,6 +251,10 @@ void RenderWidgetHostViewBase::EndFrameSubscription() {
NOTREACHED();
@@ -269,6 +270,10 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
DVLOG(1) << "FocusedNodeTouched: " << editable;
}
+void RenderWidgetHostViewBase::SetHasExternalParent(bool val) {
@@ -40,20 +40,20 @@ index dd88fae..0aaaf78 100644
return renderer_frame_number_;
}
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 8eb9689..d076b3b 100644
index 772dca1..d28c177 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -97,6 +97,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void BeginFrameSubscription(
std::unique_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
@@ -101,6 +101,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void EndFrameSubscription() override;
void FocusedNodeTouched(const gfx::Point& location_dips_screen,
bool editable) override;
+ void SetHasExternalParent(bool val) override;
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
@@ -423,6 +424,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// renderer.
bool pinch_zoom_enabled_;
@@ -455,6 +456,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// destroyed before the RWHV is destroyed.
TextInputManager* text_input_manager_;
+ // True if the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy.
@@ -63,12 +63,12 @@ index 8eb9689..d076b3b 100644
void FlushInput();
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index b902288..932f398 100644
index 5ef49e4..d391b20 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -160,6 +160,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
// deleted after this call.
virtual void EndFrameSubscription() = 0;
@@ -167,6 +167,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
virtual void FocusedNodeTouched(const gfx::Point& location_dips_screen,
bool editable) = 0;
+ // Set whether the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy.
@@ -91,7 +91,7 @@ index f772f64..7d13f9f 100644
return host ? host->GetAcceleratedWidget() : NULL;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 7591042..ea6b52c 100644
index fd8de8f..e7750f7 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -86,6 +86,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@@ -116,7 +116,7 @@ index 7591042..ea6b52c 100644
remove_standard_frame_ = params.remove_standard_frame;
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
@@ -642,6 +647,10 @@ bool DesktopWindowTreeHostWin::CanActivate() const {
@@ -641,6 +646,10 @@ bool DesktopWindowTreeHostWin::CanActivate() const {
return native_widget_delegate_->CanActivate();
}
@@ -127,7 +127,7 @@ index 7591042..ea6b52c 100644
bool DesktopWindowTreeHostWin::WantsMouseEventsWhenInactive() const {
return wants_mouse_events_when_inactive_;
}
@@ -822,11 +831,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -821,11 +830,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -146,7 +146,7 @@ index 7591042..ea6b52c 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index f357a5c..173d64d 100644
index e568375..6865670 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -137,6 +137,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -169,10 +169,10 @@ index f357a5c..173d64d 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index f792797..417d965 100644
index 586d36d..76c8f1e 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -170,6 +170,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -174,6 +174,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
use_native_frame_(false),
should_maximize_after_map_(false),
use_argb_visual_(false),
@@ -180,7 +180,7 @@ index f792797..417d965 100644
drag_drop_client_(NULL),
native_widget_delegate_(native_widget_delegate),
desktop_native_widget_aura_(desktop_native_widget_aura),
@@ -178,7 +179,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@@ -182,7 +183,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
custom_window_shape_(false),
urgency_hint_set_(false),
activatable_(true),
@@ -190,7 +190,7 @@ index f792797..417d965 100644
}
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
@@ -389,7 +391,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
@@ -392,7 +394,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
// Actually free our native resources.
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
@@ -200,7 +200,7 @@ index f792797..417d965 100644
xwindow_ = None;
desktop_native_widget_aura_->OnHostClosed();
@@ -538,6 +541,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
@@ -541,6 +544,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
}
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
@@ -209,7 +209,7 @@ index f792797..417d965 100644
return ToDIPRect(bounds_in_pixels_);
}
@@ -982,6 +987,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
@@ -986,6 +991,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
}
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
@@ -218,7 +218,7 @@ index f792797..417d965 100644
return bounds_in_pixels_;
}
@@ -1039,6 +1046,8 @@ void DesktopWindowTreeHostX11::SetBounds(
@@ -1043,6 +1050,8 @@ void DesktopWindowTreeHostX11::SetBounds(
}
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
@@ -227,7 +227,7 @@ index f792797..417d965 100644
return bounds_in_pixels_.origin();
}
@@ -1147,9 +1156,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
@@ -1151,9 +1160,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
use_argb_visual_ = true;
}
@@ -244,7 +244,7 @@ index f792797..417d965 100644
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
bounds_in_pixels_.height(),
0, // border width
@@ -1771,6 +1786,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
@@ -1784,6 +1799,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
}
break;
}
@@ -256,7 +256,7 @@ index f792797..417d965 100644
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index 6a963f8..6cf5c02 100644
index fa262f1..78a4aba 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -86,6 +86,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -272,7 +272,7 @@ index 6a963f8..6cf5c02 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(aura::Window* content_window,
@@ -263,6 +269,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -266,6 +272,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// The bounds of |xwindow_|.
gfx::Rect bounds_in_pixels_;
@@ -282,7 +282,7 @@ index 6a963f8..6cf5c02 100644
// Whenever the bounds are set, we keep the previous set of bounds around so
// we can have a better chance of getting the real
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
@@ -299,6 +308,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -302,6 +311,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
// Whether we used an ARGB visual for our window.
bool use_argb_visual_;
@@ -293,7 +293,7 @@ index 6a963f8..6cf5c02 100644
DesktopDragDropClientAuraX11* drag_drop_client_;
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
@@ -351,6 +364,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@@ -354,6 +367,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
@@ -365,7 +365,7 @@ index 8ec4b1e..587e4e3 100644
x_active_window_ = None;
}
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index a86fe48..8ec377d 100644
index 62b4b56..5fe4bd0 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type)
@@ -413,7 +413,7 @@ index a86fe48..8ec377d 100644
// This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index e52c7ff..57e466c 100644
index 0376866..7901ea4 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -238,12 +238,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -473,10 +473,10 @@ index b843416..8b81a51 100644
}
case Widget::InitParams::TYPE_CONTROL:
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 921b838..954d426 100644
index d8c14ee..ca22040 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -852,6 +852,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
@@ -855,6 +855,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
} else {
style &= ~WS_MINIMIZEBOX;
}
@@ -485,7 +485,7 @@ index 921b838..954d426 100644
SetWindowLong(hwnd(), GWL_STYLE, style);
}
@@ -2503,8 +2505,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -2500,8 +2502,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
active_mouse_tracking_flags_ = 0;
} else if (event.type() == ui::ET_MOUSEWHEEL) {
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@@ -1,8 +1,8 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index ab5b0e7..c977d57 100644
index f3d796c..bc0ee90 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -880,7 +880,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
@@ -881,7 +881,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
{
notifyPopupOpeningObservers();
@@ -12,10 +12,10 @@ index ab5b0e7..c977d57 100644
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index 218f70f..24824fd 100644
index 3df57d6..07c2307 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -415,6 +415,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
@@ -419,6 +419,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_enableFakePageScaleAnimationForTesting(false)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
@@ -23,7 +23,7 @@ index 218f70f..24824fd 100644
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -4072,9 +4073,14 @@ void WebViewImpl::pageScaleFactorChanged()
@@ -4110,9 +4111,14 @@ void WebViewImpl::pageScaleFactorChanged()
m_client->pageScaleFactorChanged();
}
@@ -40,10 +40,10 @@ index 218f70f..24824fd 100644
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index 3015ed1..0eb5455 100644
index 716e264..9726e8f 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -383,7 +383,8 @@ public:
@@ -387,7 +387,8 @@ public:
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@@ -53,7 +53,7 @@ index 3015ed1..0eb5455 100644
bool shouldAutoResize() const
{
@@ -672,6 +673,8 @@ private:
@@ -673,6 +674,8 @@ private:
float m_fakePageScaleAnimationPageScaleFactor;
bool m_fakePageScaleAnimationUseAnchor;
@@ -63,10 +63,10 @@ index 3015ed1..0eb5455 100644
bool m_ignoreInputEvents;
diff --git public/web/WebView.h public/web/WebView.h
index d25040c..67a9a1a 100644
index bca14ae..10b7ff6 100644
--- public/web/WebView.h
+++ public/web/WebView.h
@@ -443,6 +443,7 @@ public:
@@ -445,6 +445,7 @@ public:
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void setUseExternalPopupMenus(bool);