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); |
}; |