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

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

Issue 1996163002: Ensure LegacyRenderWidgetHostHWND is always created. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test 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
Index: content/browser/web_contents/web_contents_view_aura.h
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h
index 05fe1b092d1d805297f9147b2b58e7a0d6d08a56..856ccadd30c2d31f9ef04a6ea2ced1fcdf9adb49 100644
--- a/content/browser/web_contents/web_contents_view_aura.h
+++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -53,6 +53,12 @@ class CONTENT_EXPORT WebContentsViewAura
// Allow the WebContentsViewDelegate to be set explicitly.
void SetDelegateForTesting(WebContentsViewDelegate* delegate);
+ // Set a flag to pass nullptr as the parent_view argument to
+ // RenderWidgetHostViewAura::InitAsChild().
+ void set_init_rwhv_with_null_parent_for_testing(bool set) {
+ init_rwhv_with_null_parent_for_testing_ = set;
+ }
+
private:
class WindowObserver;
@@ -78,6 +84,9 @@ class CONTENT_EXPORT WebContentsViewAura
ui::TouchSelectionController* GetSelectionController() const;
TouchSelectionControllerClientAura* GetSelectionControllerClient() const;
+ // Returns GetNativeView unless overridden for testing.
+ gfx::NativeView GetRenderWidgetHostViewParent() const;
+
// Overridden from WebContentsView:
gfx::NativeView GetNativeView() const override;
gfx::NativeView GetContentNativeView() const override;
@@ -190,6 +199,8 @@ class CONTENT_EXPORT WebContentsViewAura
std::unique_ptr<GestureNavSimple> gesture_nav_simple_;
+ bool init_rwhv_with_null_parent_for_testing_;
+
DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura);
};

Powered by Google App Engine
This is Rietveld 408576698