Chromium Code Reviews| 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..8a682aea537e3b9c328cd16700a30e585ab95af0 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 a RenderWidgetHostView pointer can be casted to |
| + // RenderWidgetHostViewAura pointer in a test. Defaults to false. |
|
jam
2016/01/21 21:31:09
you're mentioning aura, but this can also be calle
ananta
2016/01/21 22:17:48
Done. I renamed the flag to is_real_render_view_ho
|
| + CONTENT_EXPORT static bool allow_host_view_cast_in_test_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(RenderViewHostFactory); |
| }; |