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

Unified Diff: content/browser/renderer_host/render_view_host_factory.h

Issue 1602903003: Display the context menu on Windows on long press release (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build error Created 4 years, 11 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/renderer_host/render_view_host_factory.h
diff --git a/content/browser/renderer_host/render_view_host_factory.h b/content/browser/renderer_host/render_view_host_factory.h
index 62b23900d6ae1219c5ceddc3b9f1fc4b7f9bda4e..aea87d769b5de0423ae0e7d99e4144fbe74b362d 100644
--- a/content/browser/renderer_host/render_view_host_factory.h
+++ b/content/browser/renderer_host/render_view_host_factory.h
@@ -39,6 +39,19 @@ class RenderViewHostFactory {
return !!factory_;
}
+ // Returns true if it is safe to allow a cast to RenderWidgetHostViewAura in
+ // a test. This defaults to false.
+ CONTENT_EXPORT static bool allow_host_view_cast_in_test() {
+ return allow_host_view_cast_in_test_;
+ }
+
+ // Sets the allow_host_view_cast_in_test_ flag which indicates that it is ok
+ // to cast a view to RenderWidgetHostViewAura in a test.
+ CONTENT_EXPORT static void set_allow_host_view_cast_in_test(
+ bool allow_cast) {
+ allow_host_view_cast_in_test_ = allow_cast;
+ }
+
protected:
RenderViewHostFactory() {}
virtual ~RenderViewHostFactory() {}
@@ -67,6 +80,10 @@ class RenderViewHostFactory {
// create the default RenderViewHosts.
CONTENT_EXPORT static RenderViewHostFactory* factory_;
+ // Set to true if we a RenderWidgetHostView pointer can be casted to
tdresser 2016/01/21 15:40:27 Fix "if we a"
ananta 2016/01/21 21:11:18 Done.
+ // RenderWidgetHostViewAura in a test. Defaults to false.
+ CONTENT_EXPORT static bool allow_host_view_cast_in_test_;
+
DISALLOW_COPY_AND_ASSIGN(RenderViewHostFactory);
};

Powered by Google App Engine
This is Rietveld 408576698