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