Index: content/renderer/pepper/ppapi_plugin_instance_impl.h |
=================================================================== |
--- content/renderer/pepper/ppapi_plugin_instance_impl.h (revision 213482) |
+++ content/renderer/pepper/ppapi_plugin_instance_impl.h (working copy) |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_IMPL_H_ |
-#define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_IMPL_H_ |
+#ifndef CONTENT_RENDERER_PEPPER_PPAPI_PLUGIN_INSTANCE_IMPL_H_ |
+#define CONTENT_RENDERER_PEPPER_PPAPI_PLUGIN_INSTANCE_IMPL_H_ |
#include <set> |
#include <string> |
@@ -15,6 +15,10 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/strings/string16.h" |
#include "cc/layers/texture_layer_client.h" |
+#include "content/common/content_export.h" |
+#include "content/public/renderer/ppapi_plugin_instance.h" |
+#include "content/renderer/pepper/plugin_delegate.h" |
+#include "content/renderer/pepper/ppp_pdf.h" |
#include "ppapi/c/dev/pp_cursor_type_dev.h" |
#include "ppapi/c/dev/ppp_find_dev.h" |
#include "ppapi/c/dev/ppp_printing_dev.h" |
@@ -50,10 +54,6 @@ |
#include "ui/base/ime/text_input_type.h" |
#include "ui/gfx/rect.h" |
#include "url/gurl.h" |
-#include "webkit/plugins/ppapi/plugin_delegate.h" |
-#include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
-#include "webkit/plugins/ppapi/ppp_pdf.h" |
-#include "webkit/plugins/webkit_plugins_export.h" |
struct PP_Point; |
struct _NPP; |
@@ -109,24 +109,22 @@ |
// |
// Note: to get from a PP_Instance to a PluginInstance*, use the |
// ResourceTracker. |
-class WEBKIT_PLUGINS_EXPORT PluginInstanceImpl : |
- public base::RefCounted<PluginInstanceImpl>, |
- public base::SupportsWeakPtr<PluginInstanceImpl>, |
- public NON_EXPORTED_BASE(PluginInstance), |
- public ::ppapi::PPB_Instance_Shared { |
+class CONTENT_EXPORT PluginInstanceImpl |
+ : public base::RefCounted<PluginInstanceImpl>, |
+ public base::SupportsWeakPtr<PluginInstanceImpl>, |
+ public NON_EXPORTED_BASE(PluginInstance), |
+ public ::ppapi::PPB_Instance_Shared { |
public: |
// Create and return a PluginInstanceImpl object which supports the most |
// recent version of PPP_Instance possible by querying the given |
// get_plugin_interface function. If the plugin does not support any valid |
// PPP_Instance interface, returns NULL. |
- static PluginInstanceImpl* Create(PluginDelegate* delegate, |
- content::RenderView* render_view, |
- PluginModule* module, |
- WebKit::WebPluginContainer* container, |
- const GURL& plugin_url); |
- // Delete should be called by the WebPlugin before this destructor. |
- virtual ~PluginInstanceImpl(); |
- |
+ static PluginInstanceImpl* Create( |
+ PluginDelegate* delegate, |
+ content::RenderView* render_view, |
+ PluginModule* module, |
+ WebKit::WebPluginContainer* container, |
+ const GURL& plugin_url); |
PluginDelegate* delegate() const { return delegate_; } |
PluginModule* module() const { return module_.get(); } |
MessageChannel& message_channel() { return *message_channel_; } |
@@ -355,28 +353,28 @@ |
ContentDecryptorDelegate* GetContentDecryptorDelegate(); |
// webkit::ppapi::PluginInstance implementation |
- content::RenderView* GetRenderView(); |
- virtual WebKit::WebPluginContainer* GetContainer(); |
- virtual ::ppapi::VarTracker* GetVarTracker(); |
- virtual const GURL& GetPluginURL(); |
- virtual base::FilePath GetModulePath(); |
+ virtual content::RenderView* GetRenderView() OVERRIDE; |
+ virtual WebKit::WebPluginContainer* GetContainer() OVERRIDE; |
+ virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE; |
+ virtual const GURL& GetPluginURL() OVERRIDE; |
+ virtual base::FilePath GetModulePath() OVERRIDE; |
virtual PP_Resource CreateExternalFileReference( |
- const base::FilePath& external_file_path); |
+ const base::FilePath& external_file_path) OVERRIDE; |
virtual PP_Resource CreateImage(gfx::ImageSkia* source_image, |
- float scale); |
+ float scale) OVERRIDE; |
virtual PP_ExternalPluginResult SwitchToOutOfProcessProxy( |
const base::FilePath& file_path, |
::ppapi::PpapiPermissions permissions, |
const IPC::ChannelHandle& channel_handle, |
base::ProcessId plugin_pid, |
- int plugin_child_id); |
- virtual void SetAlwaysOnTop(bool on_top); |
- virtual bool IsFullPagePlugin(); |
- virtual void FlashSetFullscreen(bool fullscreen, bool delay_report); |
- virtual bool IsRectTopmost(const gfx::Rect& rect); |
+ int plugin_child_id) OVERRIDE; |
+ virtual void SetAlwaysOnTop(bool on_top) OVERRIDE; |
+ virtual bool IsFullPagePlugin() OVERRIDE; |
+ virtual void FlashSetFullscreen(bool fullscreen, bool delay_report) OVERRIDE; |
+ virtual bool IsRectTopmost(const gfx::Rect& rect) OVERRIDE; |
virtual int32_t Navigate(const ::ppapi::URLRequestInfoData& request, |
const char* target, |
- bool from_user_action); |
+ bool from_user_action) OVERRIDE; |
// PPB_Instance_API implementation. |
virtual PP_Bool BindGraphics(PP_Instance instance, |
@@ -510,8 +508,12 @@ |
v8::Isolate* GetIsolate() const; |
private: |
+ friend class base::RefCounted<PluginInstanceImpl>; |
friend class PpapiUnittest; |
+ // Delete should be called by the WebPlugin before this destructor. |
+ virtual ~PluginInstanceImpl(); |
+ |
// Class to record document load notifications and play them back once the |
// real document loader becomes available. Used only by NaCl instances. |
class NaClDocumentLoader : public WebKit::WebURLLoaderClient { |
@@ -548,6 +550,7 @@ |
virtual void Sample(PP_Instance instance, |
PP_GamepadsSampleData* data) OVERRIDE; |
private: |
+ virtual ~GamepadImpl(); |
PluginDelegate* delegate_; |
}; |
@@ -858,4 +861,4 @@ |
} // namespace ppapi |
} // namespace webkit |
-#endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_IMPL_H_ |
+#endif // CONTENT_RENDERER_PEPPER_PPAPI_PLUGIN_INSTANCE_IMPL_H_ |