| 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 "third_party/skia/include/core/SkRefCnt.h" | 41 #include "third_party/skia/include/core/SkRefCnt.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" |
| 42 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 44 #include "ui/base/ime/text_input_type.h" | 45 #include "ui/base/ime/text_input_type.h" |
| 45 #include "ui/gfx/rect.h" | 46 #include "ui/gfx/rect.h" |
| 46 #include "webkit/plugins/ppapi/plugin_delegate.h" | 47 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 47 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 48 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 48 #include "webkit/plugins/ppapi/ppp_pdf.h" | 49 #include "webkit/plugins/ppapi/ppp_pdf.h" |
| 49 #include "webkit/plugins/ppapi/resource_creation_impl.h" | |
| 50 #include "webkit/plugins/webkit_plugins_export.h" | 50 #include "webkit/plugins/webkit_plugins_export.h" |
| 51 | 51 |
| 52 struct PP_Point; | 52 struct PP_Point; |
| 53 | 53 |
| 54 class SkBitmap; | 54 class SkBitmap; |
| 55 class TransportDIB; | 55 class TransportDIB; |
| 56 | 56 |
| 57 namespace WebKit { | 57 namespace WebKit { |
| 58 class WebInputEvent; | 58 class WebInputEvent; |
| 59 class WebMouseEvent; | 59 class WebMouseEvent; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 MessageChannel& message_channel() { return *message_channel_; } | 113 MessageChannel& message_channel() { return *message_channel_; } |
| 114 | 114 |
| 115 WebKit::WebPluginContainer* container() const { return container_; } | 115 WebKit::WebPluginContainer* container() const { return container_; } |
| 116 | 116 |
| 117 void set_always_on_top(bool on_top) { always_on_top_ = on_top; } | 117 void set_always_on_top(bool on_top) { always_on_top_ = on_top; } |
| 118 | 118 |
| 119 // Returns the PP_Instance uniquely identifying this instance. Guaranteed | 119 // Returns the PP_Instance uniquely identifying this instance. Guaranteed |
| 120 // nonzero. | 120 // nonzero. |
| 121 PP_Instance pp_instance() const { return pp_instance_; } | 121 PP_Instance pp_instance() const { return pp_instance_; } |
| 122 | 122 |
| 123 ResourceCreationImpl& resource_creation() { return resource_creation_; } | 123 ::ppapi::thunk::ResourceCreationAPI& resource_creation() { |
| 124 return *resource_creation_.get(); |
| 125 } |
| 124 | 126 |
| 125 // Does some pre-destructor cleanup on the instance. This is necessary | 127 // Does some pre-destructor cleanup on the instance. This is necessary |
| 126 // because some cleanup depends on the plugin instance still existing (like | 128 // because some cleanup depends on the plugin instance still existing (like |
| 127 // calling the plugin's DidDestroy function). This function is called from | 129 // calling the plugin's DidDestroy function). This function is called from |
| 128 // the WebPlugin implementation when WebKit is about to remove the plugin. | 130 // the WebPlugin implementation when WebKit is about to remove the plugin. |
| 129 void Delete(); | 131 void Delete(); |
| 130 | 132 |
| 131 // Paints the current backing store to the web page. | 133 // Paints the current backing store to the web page. |
| 132 void Paint(WebKit::WebCanvas* canvas, | 134 void Paint(WebKit::WebCanvas* canvas, |
| 133 const gfx::Rect& plugin_rect, | 135 const gfx::Rect& plugin_rect, |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 // all elements of the page, one one from the browser, which is whether the | 528 // all elements of the page, one one from the browser, which is whether the |
| 527 // tab/window has focus. We tell the plugin it has focus only when both of | 529 // tab/window has focus. We tell the plugin it has focus only when both of |
| 528 // these values are set to true. | 530 // these values are set to true. |
| 529 bool has_webkit_focus_; | 531 bool has_webkit_focus_; |
| 530 bool has_content_area_focus_; | 532 bool has_content_area_focus_; |
| 531 | 533 |
| 532 // The id of the current find operation, or -1 if none is in process. | 534 // The id of the current find operation, or -1 if none is in process. |
| 533 int find_identifier_; | 535 int find_identifier_; |
| 534 | 536 |
| 535 // Helper object that creates resources. | 537 // Helper object that creates resources. |
| 536 ResourceCreationImpl resource_creation_; | 538 scoped_ptr< ::ppapi::thunk::ResourceCreationAPI> resource_creation_; |
| 537 | 539 |
| 538 // The plugin-provided interfaces. | 540 // The plugin-provided interfaces. |
| 539 const PPP_Find_Dev* plugin_find_interface_; | 541 const PPP_Find_Dev* plugin_find_interface_; |
| 540 const PPP_Messaging* plugin_messaging_interface_; | 542 const PPP_Messaging* plugin_messaging_interface_; |
| 541 const PPP_MouseLock* plugin_mouse_lock_interface_; | 543 const PPP_MouseLock* plugin_mouse_lock_interface_; |
| 542 const PPP_InputEvent* plugin_input_event_interface_; | 544 const PPP_InputEvent* plugin_input_event_interface_; |
| 543 const PPP_Instance_Private* plugin_private_interface_; | 545 const PPP_Instance_Private* plugin_private_interface_; |
| 544 const PPP_Pdf* plugin_pdf_interface_; | 546 const PPP_Pdf* plugin_pdf_interface_; |
| 545 const PPP_Selection_Dev* plugin_selection_interface_; | 547 const PPP_Selection_Dev* plugin_selection_interface_; |
| 546 const PPP_TextInput_Dev* plugin_textinput_interface_; | 548 const PPP_TextInput_Dev* plugin_textinput_interface_; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 // The Flash proxy is associated with the instance. | 654 // The Flash proxy is associated with the instance. |
| 653 PPB_Flash_Impl flash_impl_; | 655 PPB_Flash_Impl flash_impl_; |
| 654 | 656 |
| 655 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 657 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 656 }; | 658 }; |
| 657 | 659 |
| 658 } // namespace ppapi | 660 } // namespace ppapi |
| 659 } // namespace webkit | 661 } // namespace webkit |
| 660 | 662 |
| 661 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 663 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |