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 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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "ppapi/c/ppb_audio_config.h" | 30 #include "ppapi/c/ppb_audio_config.h" |
31 #include "ppapi/c/ppb_input_event.h" | 31 #include "ppapi/c/ppb_input_event.h" |
32 #include "ppapi/c/ppb_gamepad.h" | 32 #include "ppapi/c/ppb_gamepad.h" |
33 #include "ppapi/c/ppp_graphics_3d.h" | 33 #include "ppapi/c/ppp_graphics_3d.h" |
34 #include "ppapi/c/ppp_input_event.h" | 34 #include "ppapi/c/ppp_input_event.h" |
35 #include "ppapi/c/ppp_messaging.h" | 35 #include "ppapi/c/ppp_messaging.h" |
36 #include "ppapi/c/ppp_mouse_lock.h" | 36 #include "ppapi/c/ppp_mouse_lock.h" |
37 #include "ppapi/c/private/ppp_instance_private.h" | 37 #include "ppapi/c/private/ppp_instance_private.h" |
38 #include "ppapi/shared_impl/ppb_instance_shared.h" | 38 #include "ppapi/shared_impl/ppb_instance_shared.h" |
39 #include "ppapi/shared_impl/ppb_view_shared.h" | 39 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 40 #include "ppapi/thunk/resource_creation_api.h" |
40 #include "ppapi/shared_impl/tracked_callback.h" | 41 #include "ppapi/shared_impl/tracked_callback.h" |
41 #include "third_party/skia/include/core/SkRefCnt.h" | 42 #include "third_party/skia/include/core/SkRefCnt.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" |
43 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
45 #include "ui/base/ime/text_input_type.h" | 46 #include "ui/base/ime/text_input_type.h" |
46 #include "ui/gfx/rect.h" | 47 #include "ui/gfx/rect.h" |
47 #include "webkit/plugins/ppapi/plugin_delegate.h" | 48 #include "webkit/plugins/ppapi/plugin_delegate.h" |
48 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 49 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
49 #include "webkit/plugins/ppapi/ppp_pdf.h" | 50 #include "webkit/plugins/ppapi/ppp_pdf.h" |
50 #include "webkit/plugins/ppapi/resource_creation_impl.h" | |
51 #include "webkit/plugins/webkit_plugins_export.h" | 51 #include "webkit/plugins/webkit_plugins_export.h" |
52 | 52 |
53 struct PP_Point; | 53 struct PP_Point; |
54 | 54 |
55 class SkBitmap; | 55 class SkBitmap; |
56 class TransportDIB; | 56 class TransportDIB; |
57 | 57 |
58 namespace WebKit { | 58 namespace WebKit { |
59 class WebInputEvent; | 59 class WebInputEvent; |
60 class WebMouseEvent; | 60 class WebMouseEvent; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 MessageChannel& message_channel() { return *message_channel_; } | 110 MessageChannel& message_channel() { return *message_channel_; } |
111 | 111 |
112 WebKit::WebPluginContainer* container() const { return container_; } | 112 WebKit::WebPluginContainer* container() const { return container_; } |
113 | 113 |
114 void set_always_on_top(bool on_top) { always_on_top_ = on_top; } | 114 void set_always_on_top(bool on_top) { always_on_top_ = on_top; } |
115 | 115 |
116 // Returns the PP_Instance uniquely identifying this instance. Guaranteed | 116 // Returns the PP_Instance uniquely identifying this instance. Guaranteed |
117 // nonzero. | 117 // nonzero. |
118 PP_Instance pp_instance() const { return pp_instance_; } | 118 PP_Instance pp_instance() const { return pp_instance_; } |
119 | 119 |
120 ResourceCreationImpl& resource_creation() { return resource_creation_; } | 120 ::ppapi::thunk::ResourceCreationAPI& resource_creation() { |
| 121 return *resource_creation_.get(); |
| 122 } |
121 | 123 |
122 // Does some pre-destructor cleanup on the instance. This is necessary | 124 // Does some pre-destructor cleanup on the instance. This is necessary |
123 // because some cleanup depends on the plugin instance still existing (like | 125 // because some cleanup depends on the plugin instance still existing (like |
124 // calling the plugin's DidDestroy function). This function is called from | 126 // calling the plugin's DidDestroy function). This function is called from |
125 // the WebPlugin implementation when WebKit is about to remove the plugin. | 127 // the WebPlugin implementation when WebKit is about to remove the plugin. |
126 void Delete(); | 128 void Delete(); |
127 | 129 |
128 // Paints the current backing store to the web page. | 130 // Paints the current backing store to the web page. |
129 void Paint(WebKit::WebCanvas* canvas, | 131 void Paint(WebKit::WebCanvas* canvas, |
130 const gfx::Rect& plugin_rect, | 132 const gfx::Rect& plugin_rect, |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 // all elements of the page, one one from the browser, which is whether the | 536 // all elements of the page, one one from the browser, which is whether the |
535 // tab/window has focus. We tell the plugin it has focus only when both of | 537 // tab/window has focus. We tell the plugin it has focus only when both of |
536 // these values are set to true. | 538 // these values are set to true. |
537 bool has_webkit_focus_; | 539 bool has_webkit_focus_; |
538 bool has_content_area_focus_; | 540 bool has_content_area_focus_; |
539 | 541 |
540 // The id of the current find operation, or -1 if none is in process. | 542 // The id of the current find operation, or -1 if none is in process. |
541 int find_identifier_; | 543 int find_identifier_; |
542 | 544 |
543 // Helper object that creates resources. | 545 // Helper object that creates resources. |
544 ResourceCreationImpl resource_creation_; | 546 scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> resource_creation_; |
545 | 547 |
546 // The plugin-provided interfaces. | 548 // The plugin-provided interfaces. |
547 const PPP_Find_Dev* plugin_find_interface_; | 549 const PPP_Find_Dev* plugin_find_interface_; |
548 const PPP_InputEvent* plugin_input_event_interface_; | 550 const PPP_InputEvent* plugin_input_event_interface_; |
549 const PPP_Messaging* plugin_messaging_interface_; | 551 const PPP_Messaging* plugin_messaging_interface_; |
550 const PPP_MouseLock* plugin_mouse_lock_interface_; | 552 const PPP_MouseLock* plugin_mouse_lock_interface_; |
551 const PPP_Pdf* plugin_pdf_interface_; | 553 const PPP_Pdf* plugin_pdf_interface_; |
552 const PPP_Instance_Private* plugin_private_interface_; | 554 const PPP_Instance_Private* plugin_private_interface_; |
553 const PPP_Selection_Dev* plugin_selection_interface_; | 555 const PPP_Selection_Dev* plugin_selection_interface_; |
554 const PPP_TextInput_Dev* plugin_textinput_interface_; | 556 const PPP_TextInput_Dev* plugin_textinput_interface_; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 // the pointer so we can re-send it later if we are reset to talk to NaCl. | 671 // the pointer so we can re-send it later if we are reset to talk to NaCl. |
670 scoped_refptr<PPB_URLLoader_Impl> document_loader_; | 672 scoped_refptr<PPB_URLLoader_Impl> document_loader_; |
671 | 673 |
672 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 674 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
673 }; | 675 }; |
674 | 676 |
675 } // namespace ppapi | 677 } // namespace ppapi |
676 } // namespace webkit | 678 } // namespace webkit |
677 | 679 |
678 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 680 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |