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/public/web/WebPlugin.h" | 15 #include "third_party/WebKit/public/web/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; | 19 struct _NPP; |
20 | 20 |
| 21 namespace content { |
| 22 class RenderView; |
| 23 } |
| 24 |
21 namespace WebKit { | 25 namespace WebKit { |
22 struct WebPluginParams; | 26 struct WebPluginParams; |
23 struct WebPrintParams; | 27 struct WebPrintParams; |
24 } | 28 } |
25 | 29 |
26 namespace webkit { | 30 namespace webkit { |
27 namespace ppapi { | 31 namespace ppapi { |
28 | 32 |
29 class PluginDelegate; | 33 class PluginDelegate; |
30 class PluginInstance; | 34 class PluginInstance; |
31 class PluginModule; | 35 class PluginModule; |
32 class PPB_URLLoader_Impl; | 36 class PPB_URLLoader_Impl; |
33 | 37 |
34 class WebPluginImpl : public WebKit::WebPlugin { | 38 class WebPluginImpl : public WebKit::WebPlugin { |
35 public: | 39 public: |
36 WEBKIT_PLUGINS_EXPORT WebPluginImpl( | 40 WEBKIT_PLUGINS_EXPORT WebPluginImpl( |
37 PluginModule* module, | 41 PluginModule* module, |
38 const WebKit::WebPluginParams& params, | 42 const WebKit::WebPluginParams& params, |
39 const base::WeakPtr<PluginDelegate>& plugin_delegate); | 43 const base::WeakPtr<PluginDelegate>& plugin_delegate, |
| 44 const base::WeakPtr<content::RenderView>& render_view); |
40 | 45 |
41 PluginInstance* instance() { return instance_.get(); } | 46 PluginInstance* instance() { return instance_.get(); } |
42 | 47 |
43 // WebKit::WebPlugin implementation. | 48 // WebKit::WebPlugin implementation. |
44 virtual WebKit::WebPluginContainer* container() const; | 49 virtual WebKit::WebPluginContainer* container() const; |
45 virtual bool initialize(WebKit::WebPluginContainer* container); | 50 virtual bool initialize(WebKit::WebPluginContainer* container); |
46 virtual void destroy(); | 51 virtual void destroy(); |
47 virtual NPObject* scriptableObject(); | 52 virtual NPObject* scriptableObject(); |
48 virtual struct _NPP* pluginNPP(); | 53 virtual struct _NPP* pluginNPP(); |
49 virtual bool getFormValue(WebKit::WebString& value); | 54 virtual bool getFormValue(WebKit::WebString& value); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 PP_Var instance_object_; | 108 PP_Var instance_object_; |
104 WebKit::WebPluginContainer* container_; | 109 WebKit::WebPluginContainer* container_; |
105 | 110 |
106 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 111 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
107 }; | 112 }; |
108 | 113 |
109 } // namespace ppapi | 114 } // namespace ppapi |
110 } // namespace webkit | 115 } // namespace webkit |
111 | 116 |
112 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ | 117 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_WEBPLUGIN_IMPL_H_ |
OLD | NEW |