Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 1996163002: Ensure LegacyRenderWidgetHostHWND is always created. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback from sadrul Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 98efc51cbca27630cf64b965849ebfb11b124180..63856d1e2de32e4050125482d19cbdac4724eb35 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -502,7 +502,8 @@ WebContentsViewAura::WebContentsViewAura(WebContentsImpl* web_contents,
current_rvh_for_drag_(NULL),
current_overscroll_gesture_(OVERSCROLL_NONE),
completed_overscroll_gesture_(OVERSCROLL_NONE),
- navigation_overlay_(nullptr) {}
+ navigation_overlay_(nullptr),
+ init_rwhv_with_null_parent_for_testing_(false) {}
void WebContentsViewAura::SetDelegateForTesting(
WebContentsViewDelegate* delegate) {
@@ -600,6 +601,12 @@ WebContentsViewAura::GetSelectionControllerClient() const {
return view ? view->selection_controller_client() : nullptr;
}
+gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
+ if (init_rwhv_with_null_parent_for_testing_)
+ return nullptr;
+ return window_.get();
+}
+
////////////////////////////////////////////////////////////////////////////////
// WebContentsViewAura, WebContentsView implementation:
@@ -736,7 +743,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
RenderWidgetHostViewAura* view =
new RenderWidgetHostViewAura(render_widget_host, is_guest_view_hack);
- view->InitAsChild(GetNativeView());
+ view->InitAsChild(GetRenderWidgetHostViewParent());
RenderWidgetHostImpl* host_impl =
RenderWidgetHostImpl::From(render_widget_host);
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698