OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 bool is_showing() const { return is_showing_; } | 116 bool is_showing() const { return is_showing_; } |
117 bool is_occluded() const { return is_occluded_; } | 117 bool is_occluded() const { return is_occluded_; } |
118 bool did_swap_compositor_frame() const { return did_swap_compositor_frame_; } | 118 bool did_swap_compositor_frame() const { return did_swap_compositor_frame_; } |
119 void reset_did_swap_compositor_frame() { did_swap_compositor_frame_ = false; } | 119 void reset_did_swap_compositor_frame() { did_swap_compositor_frame_ = false; } |
120 bool did_change_compositor_frame_sink() { | 120 bool did_change_compositor_frame_sink() { |
121 return did_change_compositor_frame_sink_; | 121 return did_change_compositor_frame_sink_; |
122 } | 122 } |
123 void reset_did_change_compositor_frame_sink() { | 123 void reset_did_change_compositor_frame_sink() { |
124 did_change_compositor_frame_sink_ = false; | 124 did_change_compositor_frame_sink_ = false; |
125 } | 125 } |
| 126 void set_native_view(gfx::NativeView native_view) { |
| 127 native_view_ = native_view; |
| 128 } |
126 | 129 |
127 protected: | 130 protected: |
128 RenderWidgetHostImpl* rwh_; | 131 RenderWidgetHostImpl* rwh_; |
129 cc::FrameSinkId frame_sink_id_; | 132 cc::FrameSinkId frame_sink_id_; |
130 | 133 |
131 private: | 134 private: |
132 bool is_showing_; | 135 bool is_showing_; |
133 bool is_occluded_; | 136 bool is_occluded_; |
134 bool did_swap_compositor_frame_; | 137 bool did_swap_compositor_frame_; |
135 bool did_change_compositor_frame_sink_ = false; | 138 bool did_change_compositor_frame_sink_ = false; |
136 SkColor background_color_; | 139 SkColor background_color_; |
137 ui::DummyTextInputClient text_input_client_; | 140 ui::DummyTextInputClient text_input_client_; |
| 141 gfx::NativeView native_view_ = nullptr; |
138 }; | 142 }; |
139 | 143 |
140 #if defined(COMPILER_MSVC) | 144 #if defined(COMPILER_MSVC) |
141 // See comment for same warning on RenderViewHostImpl. | 145 // See comment for same warning on RenderViewHostImpl. |
142 #pragma warning(push) | 146 #pragma warning(push) |
143 #pragma warning(disable: 4250) | 147 #pragma warning(disable: 4250) |
144 #endif | 148 #endif |
145 | 149 |
146 // TestRenderViewHost ---------------------------------------------------------- | 150 // TestRenderViewHost ---------------------------------------------------------- |
147 | 151 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 private: | 309 private: |
306 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors> | 310 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors> |
307 ScopedSetSupportedScaleFactors; | 311 ScopedSetSupportedScaleFactors; |
308 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; | 312 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; |
309 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); | 313 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); |
310 }; | 314 }; |
311 | 315 |
312 } // namespace content | 316 } // namespace content |
313 | 317 |
314 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ | 318 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ |
OLD | NEW |