Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: content/renderer/pepper/ppapi_plugin_instance_impl.h

Issue 20165002: Move webkit/plugins/ppapi to content/renderer/pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PPAPI_PLUGIN_INSTANCE_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PPAPI_PLUGIN_INSTANCE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "cc/layers/texture_layer_client.h" 17 #include "cc/layers/texture_layer_client.h"
18 #include "content/common/content_export.h"
19 #include "content/public/renderer/ppapi_plugin_instance.h"
20 #include "content/renderer/pepper/plugin_delegate.h"
21 #include "content/renderer/pepper/ppp_pdf.h"
18 #include "ppapi/c/dev/pp_cursor_type_dev.h" 22 #include "ppapi/c/dev/pp_cursor_type_dev.h"
19 #include "ppapi/c/dev/ppp_find_dev.h" 23 #include "ppapi/c/dev/ppp_find_dev.h"
20 #include "ppapi/c/dev/ppp_printing_dev.h" 24 #include "ppapi/c/dev/ppp_printing_dev.h"
21 #include "ppapi/c/dev/ppp_selection_dev.h" 25 #include "ppapi/c/dev/ppp_selection_dev.h"
22 #include "ppapi/c/dev/ppp_text_input_dev.h" 26 #include "ppapi/c/dev/ppp_text_input_dev.h"
23 #include "ppapi/c/dev/ppp_zoom_dev.h" 27 #include "ppapi/c/dev/ppp_zoom_dev.h"
24 #include "ppapi/c/pp_completion_callback.h" 28 #include "ppapi/c/pp_completion_callback.h"
25 #include "ppapi/c/pp_instance.h" 29 #include "ppapi/c/pp_instance.h"
26 #include "ppapi/c/pp_time.h" 30 #include "ppapi/c/pp_time.h"
27 #include "ppapi/c/pp_var.h" 31 #include "ppapi/c/pp_var.h"
(...skipping 15 matching lines...) Expand all
43 #include "skia/ext/refptr.h" 47 #include "skia/ext/refptr.h"
44 #include "third_party/WebKit/public/platform/WebCanvas.h" 48 #include "third_party/WebKit/public/platform/WebCanvas.h"
45 #include "third_party/WebKit/public/platform/WebString.h" 49 #include "third_party/WebKit/public/platform/WebString.h"
46 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" 50 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
47 #include "third_party/WebKit/public/platform/WebURLResponse.h" 51 #include "third_party/WebKit/public/platform/WebURLResponse.h"
48 #include "third_party/WebKit/public/web/WebPlugin.h" 52 #include "third_party/WebKit/public/web/WebPlugin.h"
49 #include "third_party/WebKit/public/web/WebUserGestureToken.h" 53 #include "third_party/WebKit/public/web/WebUserGestureToken.h"
50 #include "ui/base/ime/text_input_type.h" 54 #include "ui/base/ime/text_input_type.h"
51 #include "ui/gfx/rect.h" 55 #include "ui/gfx/rect.h"
52 #include "url/gurl.h" 56 #include "url/gurl.h"
53 #include "webkit/plugins/ppapi/plugin_delegate.h"
54 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
55 #include "webkit/plugins/ppapi/ppp_pdf.h"
56 #include "webkit/plugins/webkit_plugins_export.h"
57 57
58 struct PP_Point; 58 struct PP_Point;
59 struct _NPP; 59 struct _NPP;
60 60
61 class SkBitmap; 61 class SkBitmap;
62 class TransportDIB; 62 class TransportDIB;
63 63
64 namespace WebKit { 64 namespace WebKit {
65 class WebInputEvent; 65 class WebInputEvent;
66 class WebLayer; 66 class WebLayer;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 class PluginModule; 102 class PluginModule;
103 class PluginObject; 103 class PluginObject;
104 class PPB_Graphics3D_Impl; 104 class PPB_Graphics3D_Impl;
105 class PPB_ImageData_Impl; 105 class PPB_ImageData_Impl;
106 class PPB_URLLoader_Impl; 106 class PPB_URLLoader_Impl;
107 107
108 // Represents one time a plugin appears on one web page. 108 // Represents one time a plugin appears on one web page.
109 // 109 //
110 // Note: to get from a PP_Instance to a PluginInstance*, use the 110 // Note: to get from a PP_Instance to a PluginInstance*, use the
111 // ResourceTracker. 111 // ResourceTracker.
112 class WEBKIT_PLUGINS_EXPORT PluginInstanceImpl : 112 class CONTENT_EXPORT PluginInstanceImpl
113 public base::RefCounted<PluginInstanceImpl>, 113 : public base::RefCounted<PluginInstanceImpl>,
114 public base::SupportsWeakPtr<PluginInstanceImpl>, 114 public base::SupportsWeakPtr<PluginInstanceImpl>,
115 public NON_EXPORTED_BASE(PluginInstance), 115 public NON_EXPORTED_BASE(PluginInstance),
116 public ::ppapi::PPB_Instance_Shared { 116 public ::ppapi::PPB_Instance_Shared {
117 public: 117 public:
118 // Create and return a PluginInstanceImpl object which supports the most 118 // Create and return a PluginInstanceImpl object which supports the most
119 // recent version of PPP_Instance possible by querying the given 119 // recent version of PPP_Instance possible by querying the given
120 // get_plugin_interface function. If the plugin does not support any valid 120 // get_plugin_interface function. If the plugin does not support any valid
121 // PPP_Instance interface, returns NULL. 121 // PPP_Instance interface, returns NULL.
122 static PluginInstanceImpl* Create(PluginDelegate* delegate, 122 static PluginInstanceImpl* Create(
123 content::RenderView* render_view, 123 PluginDelegate* delegate,
124 PluginModule* module, 124 content::RenderView* render_view,
125 WebKit::WebPluginContainer* container, 125 PluginModule* module,
126 const GURL& plugin_url); 126 WebKit::WebPluginContainer* container,
127 const GURL& plugin_url);
127 // Delete should be called by the WebPlugin before this destructor. 128 // Delete should be called by the WebPlugin before this destructor.
128 virtual ~PluginInstanceImpl(); 129 virtual ~PluginInstanceImpl();
129 130
130 PluginDelegate* delegate() const { return delegate_; } 131 PluginDelegate* delegate() const { return delegate_; }
131 PluginModule* module() const { return module_.get(); } 132 PluginModule* module() const { return module_.get(); }
132 MessageChannel& message_channel() { return *message_channel_; } 133 MessageChannel& message_channel() { return *message_channel_; }
133 134
134 WebKit::WebPluginContainer* container() const { return container_; } 135 WebKit::WebPluginContainer* container() const { return container_; }
135 136
136 // Returns the PP_Instance uniquely identifying this instance. Guaranteed 137 // Returns the PP_Instance uniquely identifying this instance. Guaranteed
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 // Isolate in which this Instance was created when interacting with v8. 852 // Isolate in which this Instance was created when interacting with v8.
852 v8::Isolate* isolate_; 853 v8::Isolate* isolate_;
853 854
854 friend class PpapiPluginInstanceTest; 855 friend class PpapiPluginInstanceTest;
855 DISALLOW_COPY_AND_ASSIGN(PluginInstanceImpl); 856 DISALLOW_COPY_AND_ASSIGN(PluginInstanceImpl);
856 }; 857 };
857 858
858 } // namespace ppapi 859 } // namespace ppapi
859 } // namespace webkit 860 } // namespace webkit
860 861
861 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_IMPL_H_ 862 #endif // CONTENT_RENDERER_PEPPER_PPAPI_PLUGIN_INSTANCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698