| 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_WEBPLUGIN_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/sequenced_task_runner_helpers.h" | 13 #include "base/sequenced_task_runner_helpers.h" |
| 14 #include "ppapi/c/pp_var.h" | 14 #include "ppapi/c/pp_var.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
| 17 #include "webkit/plugins/webkit_plugins_export.h" | 17 #include "webkit/plugins/webkit_plugins_export.h" |
| 18 | 18 |
| 19 struct _NPP; | |
| 20 | |
| 21 namespace WebKit { | 19 namespace WebKit { |
| 22 struct WebPluginParams; | 20 struct WebPluginParams; |
| 23 struct WebPrintParams; | 21 struct WebPrintParams; |
| 24 } | 22 } |
| 25 | 23 |
| 26 namespace webkit { | 24 namespace webkit { |
| 27 namespace ppapi { | 25 namespace ppapi { |
| 28 | 26 |
| 29 class PluginDelegate; | 27 class PluginDelegate; |
| 30 class PluginInstance; | 28 class PluginInstance; |
| 31 class PluginModule; | 29 class PluginModule; |
| 32 class PPB_URLLoader_Impl; | 30 class PPB_URLLoader_Impl; |
| 33 | 31 |
| 34 class WebPluginImpl : public WebKit::WebPlugin { | 32 class WebPluginImpl : public WebKit::WebPlugin { |
| 35 public: | 33 public: |
| 36 WEBKIT_PLUGINS_EXPORT WebPluginImpl( | 34 WEBKIT_PLUGINS_EXPORT WebPluginImpl( |
| 37 PluginModule* module, | 35 PluginModule* module, |
| 38 const WebKit::WebPluginParams& params, | 36 const WebKit::WebPluginParams& params, |
| 39 const base::WeakPtr<PluginDelegate>& plugin_delegate); | 37 const base::WeakPtr<PluginDelegate>& plugin_delegate); |
| 40 | 38 |
| 41 PluginInstance* instance() { return instance_.get(); } | 39 PluginInstance* instance() { return instance_.get(); } |
| 42 | 40 |
| 43 // WebKit::WebPlugin implementation. | 41 // WebKit::WebPlugin implementation. |
| 44 virtual WebKit::WebPluginContainer* container() const; | 42 virtual WebKit::WebPluginContainer* container() const; |
| 45 virtual bool initialize(WebKit::WebPluginContainer* container); | 43 virtual bool initialize(WebKit::WebPluginContainer* container); |
| 46 virtual void destroy(); | 44 virtual void destroy(); |
| 47 virtual NPObject* scriptableObject(); | 45 virtual NPObject* scriptableObject(); |
| 48 virtual struct _NPP* pluginNPP(); | |
| 49 virtual bool getFormValue(WebKit::WebString& value); | 46 virtual bool getFormValue(WebKit::WebString& value); |
| 50 virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); | 47 virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); |
| 51 virtual void updateGeometry( | 48 virtual void updateGeometry( |
| 52 const WebKit::WebRect& frame_rect, | 49 const WebKit::WebRect& frame_rect, |
| 53 const WebKit::WebRect& clip_rect, | 50 const WebKit::WebRect& clip_rect, |
| 54 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, | 51 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, |
| 55 bool is_visible); | 52 bool is_visible); |
| 56 virtual void updateFocus(bool focused); | 53 virtual void updateFocus(bool focused); |
| 57 virtual void updateVisibility(bool visible); | 54 virtual void updateVisibility(bool visible); |
| 58 virtual bool acceptsInputEvents(); | 55 virtual bool acceptsInputEvents(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 PP_Var instance_object_; | 100 PP_Var instance_object_; |
| 104 WebKit::WebPluginContainer* container_; | 101 WebKit::WebPluginContainer* container_; |
| 105 | 102 |
| 106 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 103 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
| 107 }; | 104 }; |
| 108 | 105 |
| 109 } // namespace ppapi | 106 } // namespace ppapi |
| 110 } // namespace webkit | 107 } // namespace webkit |
| 111 | 108 |
| 112 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ | 109 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ |
| OLD | NEW |