OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 namespace WebKit { | 53 namespace WebKit { |
54 struct WebCursorInfo; | 54 struct WebCursorInfo; |
55 class WebInputEvent; | 55 class WebInputEvent; |
56 class WebPluginContainer; | 56 class WebPluginContainer; |
57 } | 57 } |
58 | 58 |
59 namespace ppapi { | 59 namespace ppapi { |
60 struct PPP_Instance_Combined; | 60 struct PPP_Instance_Combined; |
| 61 class Resource; |
61 } | 62 } |
62 | 63 |
63 namespace webkit { | 64 namespace webkit { |
64 namespace ppapi { | 65 namespace ppapi { |
65 | 66 |
66 class FullscreenContainer; | 67 class FullscreenContainer; |
67 class MessageChannel; | 68 class MessageChannel; |
68 class ObjectVar; | 69 class ObjectVar; |
69 class PluginDelegate; | 70 class PluginDelegate; |
70 class PluginModule; | 71 class PluginModule; |
71 class PluginObject; | 72 class PluginObject; |
72 class PPB_Graphics2D_Impl; | 73 class PPB_Graphics2D_Impl; |
73 class PPB_Graphics3D_Impl; | 74 class PPB_Graphics3D_Impl; |
74 class PPB_ImageData_Impl; | 75 class PPB_ImageData_Impl; |
75 class PPB_Surface3D_Impl; | 76 class PPB_Surface3D_Impl; |
76 class PPB_URLLoader_Impl; | 77 class PPB_URLLoader_Impl; |
77 class PPB_URLRequestInfo_Impl; | 78 class PPB_URLRequestInfo_Impl; |
78 class Resource; | |
79 | 79 |
80 // Represents one time a plugin appears on one web page. | 80 // Represents one time a plugin appears on one web page. |
81 // | 81 // |
82 // Note: to get from a PP_Instance to a PluginInstance*, use the | 82 // Note: to get from a PP_Instance to a PluginInstance*, use the |
83 // ResourceTracker. | 83 // ResourceTracker. |
84 class PluginInstance : public base::RefCounted<PluginInstance>, | 84 class PluginInstance : public base::RefCounted<PluginInstance>, |
85 public ::ppapi::FunctionGroupBase, | 85 public ::ppapi::FunctionGroupBase, |
86 public ::ppapi::thunk::PPB_Instance_FunctionAPI, | 86 public ::ppapi::thunk::PPB_Instance_FunctionAPI, |
87 public ::ppapi::InstanceImpl { | 87 public ::ppapi::InstanceImpl { |
88 public: | 88 public: |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 // plugin. This will be a 0-sized rectangle if the plugin has not yet been | 365 // plugin. This will be a 0-sized rectangle if the plugin has not yet been |
366 // laid out. | 366 // laid out. |
367 gfx::Rect position_; | 367 gfx::Rect position_; |
368 | 368 |
369 // Current clip rect. This will be empty if the plugin is not currently | 369 // Current clip rect. This will be empty if the plugin is not currently |
370 // visible. This is in the plugin's coordinate system, so fully visible will | 370 // visible. This is in the plugin's coordinate system, so fully visible will |
371 // be (0, 0, w, h) regardless of scroll position. | 371 // be (0, 0, w, h) regardless of scroll position. |
372 gfx::Rect clip_; | 372 gfx::Rect clip_; |
373 | 373 |
374 // The current device context for painting in 2D or 3D. | 374 // The current device context for painting in 2D or 3D. |
375 scoped_refptr<Resource> bound_graphics_; | 375 scoped_refptr< ::ppapi::Resource> bound_graphics_; |
376 | 376 |
377 // We track two types of focus, one from WebKit, which is the focus among | 377 // We track two types of focus, one from WebKit, which is the focus among |
378 // all elements of the page, one one from the browser, which is whether the | 378 // all elements of the page, one one from the browser, which is whether the |
379 // tab/window has focus. We tell the plugin it has focus only when both of | 379 // tab/window has focus. We tell the plugin it has focus only when both of |
380 // these values are set to true. | 380 // these values are set to true. |
381 bool has_webkit_focus_; | 381 bool has_webkit_focus_; |
382 bool has_content_area_focus_; | 382 bool has_content_area_focus_; |
383 | 383 |
384 // The id of the current find operation, or -1 if none is in process. | 384 // The id of the current find operation, or -1 if none is in process. |
385 int find_identifier_; | 385 int find_identifier_; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 uint32_t input_event_mask_; | 490 uint32_t input_event_mask_; |
491 uint32_t filtered_input_event_mask_; | 491 uint32_t filtered_input_event_mask_; |
492 | 492 |
493 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 493 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
494 }; | 494 }; |
495 | 495 |
496 } // namespace ppapi | 496 } // namespace ppapi |
497 } // namespace webkit | 497 } // namespace webkit |
498 | 498 |
499 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 499 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |