OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class WebFrame; | 22 class WebFrame; |
23 class WebGraphicsContext3D; | 23 class WebGraphicsContext3D; |
24 class WebLayer; | 24 class WebLayer; |
25 struct WebPluginParams; | 25 struct WebPluginParams; |
26 } | 26 } |
27 | 27 |
28 namespace cc { | 28 namespace cc { |
29 class SharedBitmap; | 29 class SharedBitmap; |
30 } | 30 } |
31 | 31 |
| 32 namespace gpu { |
| 33 namespace gles2 { |
| 34 class GLES2Interface; |
| 35 } |
| 36 } |
| 37 |
32 namespace test_runner { | 38 namespace test_runner { |
33 | 39 |
34 class WebTestDelegate; | 40 class WebTestDelegate; |
35 | 41 |
36 // A fake implemention of blink::WebPlugin for testing purposes. | 42 // A fake implemention of blink::WebPlugin for testing purposes. |
37 // | 43 // |
38 // It uses WebGraphicsContext3D to paint a scene consisiting of a primitive | 44 // It uses WebGraphicsContext3D to paint a scene consisiting of a primitive |
39 // over a background. The primitive and background can be customized using | 45 // over a background. The primitive and background can be customized using |
40 // the following plugin parameters: | 46 // the following plugin parameters: |
41 // primitive: none (default), triangle. | 47 // primitive: none (default), triangle. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 149 |
144 // Functions for drawing scene in Software. | 150 // Functions for drawing scene in Software. |
145 void DrawSceneSoftware(void* memory); | 151 void DrawSceneSoftware(void* memory); |
146 | 152 |
147 blink::WebFrame* frame_; | 153 blink::WebFrame* frame_; |
148 WebTestDelegate* delegate_; | 154 WebTestDelegate* delegate_; |
149 blink::WebPluginContainer* container_; | 155 blink::WebPluginContainer* container_; |
150 | 156 |
151 blink::WebRect rect_; | 157 blink::WebRect rect_; |
152 blink::WebGraphicsContext3D* context_; | 158 blink::WebGraphicsContext3D* context_; |
| 159 gpu::gles2::GLES2Interface* gl_; |
153 unsigned color_texture_; | 160 unsigned color_texture_; |
154 cc::TextureMailbox texture_mailbox_; | 161 cc::TextureMailbox texture_mailbox_; |
155 scoped_ptr<cc::SharedBitmap> shared_bitmap_; | 162 scoped_ptr<cc::SharedBitmap> shared_bitmap_; |
156 bool mailbox_changed_; | 163 bool mailbox_changed_; |
157 unsigned framebuffer_; | 164 unsigned framebuffer_; |
158 Scene scene_; | 165 Scene scene_; |
159 scoped_refptr<cc::TextureLayer> layer_; | 166 scoped_refptr<cc::TextureLayer> layer_; |
160 scoped_ptr<blink::WebLayer> web_layer_; | 167 scoped_ptr<blink::WebLayer> web_layer_; |
161 | 168 |
162 blink::WebPluginContainer::TouchEventRequestType touch_event_request_; | 169 blink::WebPluginContainer::TouchEventRequestType touch_event_request_; |
163 // Requests touch events from the WebPluginContainerImpl multiple times to | 170 // Requests touch events from the WebPluginContainerImpl multiple times to |
164 // tickle webkit.org/b/108381 | 171 // tickle webkit.org/b/108381 |
165 bool re_request_touch_events_; | 172 bool re_request_touch_events_; |
166 bool print_event_details_; | 173 bool print_event_details_; |
167 bool print_user_gesture_status_; | 174 bool print_user_gesture_status_; |
168 bool can_process_drag_; | 175 bool can_process_drag_; |
169 bool supports_keyboard_focus_; | 176 bool supports_keyboard_focus_; |
170 | 177 |
171 bool is_persistent_; | 178 bool is_persistent_; |
172 bool can_create_without_renderer_; | 179 bool can_create_without_renderer_; |
173 | 180 |
174 DISALLOW_COPY_AND_ASSIGN(TestPlugin); | 181 DISALLOW_COPY_AND_ASSIGN(TestPlugin); |
175 }; | 182 }; |
176 | 183 |
177 } // namespace test_runner | 184 } // namespace test_runner |
178 | 185 |
179 #endif // COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ | 186 #endif // COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ |
OLD | NEW |