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

Side by Side Diff: content/renderer/npapi/webplugin_impl.h

Issue 107183002: Move more of the plugin code in the renderer to use RenderFrame instead of RenderView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years 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 CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ 5 #ifndef CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_
6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ 6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 class WebURLResponse; 36 class WebURLResponse;
37 class WebURLLoader; 37 class WebURLLoader;
38 class WebURLRequest; 38 class WebURLRequest;
39 } 39 }
40 40
41 namespace webkit_glue { 41 namespace webkit_glue {
42 class MultipartResponseDelegate; 42 class MultipartResponseDelegate;
43 } // namespace webkit_glue 43 } // namespace webkit_glue
44 44
45 namespace content { 45 namespace content {
46 class RenderFrame; 46 class RenderFrameImpl;
47 class RenderViewImpl; 47 class RenderViewImpl;
48 class WebPluginDelegate; 48 class WebPluginDelegate;
49 49
50 // This is the WebKit side of the plugin implementation that forwards calls, 50 // This is the WebKit side of the plugin implementation that forwards calls,
51 // after changing out of WebCore types, to a delegate. The delegate may 51 // after changing out of WebCore types, to a delegate. The delegate may
52 // be in a different process. 52 // be in a different process.
53 class WebPluginImpl : public WebPlugin, 53 class WebPluginImpl : public WebPlugin,
54 public blink::WebPlugin, 54 public blink::WebPlugin,
55 public blink::WebURLLoaderClient { 55 public blink::WebURLLoaderClient {
56 public: 56 public:
57 WebPluginImpl( 57 WebPluginImpl(
58 blink::WebFrame* frame, 58 blink::WebFrame* frame,
59 const blink::WebPluginParams& params, 59 const blink::WebPluginParams& params,
60 const base::FilePath& file_path, 60 const base::FilePath& file_path,
61 const base::WeakPtr<RenderViewImpl>& render_view, 61 const base::WeakPtr<RenderViewImpl>& render_view,
62 RenderFrame* render_frame); 62 RenderFrameImpl* render_frame);
63 virtual ~WebPluginImpl(); 63 virtual ~WebPluginImpl();
64 64
65 // Helper function for sorting post data. 65 // Helper function for sorting post data.
66 CONTENT_EXPORT static bool SetPostData(blink::WebURLRequest* request, 66 CONTENT_EXPORT static bool SetPostData(blink::WebURLRequest* request,
67 const char* buf, 67 const char* buf,
68 uint32 length); 68 uint32 length);
69 69
70 blink::WebFrame* webframe() { return webframe_; } 70 blink::WebFrame* webframe() { return webframe_; }
71 WebPluginDelegate* delegate() { return delegate_; } 71 WebPluginDelegate* delegate() { return delegate_; }
72 72
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 gfx::PluginWindowHandle window_; 280 gfx::PluginWindowHandle window_;
281 #if defined(OS_MACOSX) 281 #if defined(OS_MACOSX)
282 bool next_io_surface_allocated_; 282 bool next_io_surface_allocated_;
283 int32 next_io_surface_width_; 283 int32 next_io_surface_width_;
284 int32 next_io_surface_height_; 284 int32 next_io_surface_height_;
285 uint32 next_io_surface_id_; 285 uint32 next_io_surface_id_;
286 scoped_refptr<cc::IOSurfaceLayer> io_surface_layer_; 286 scoped_refptr<cc::IOSurfaceLayer> io_surface_layer_;
287 scoped_ptr<blink::WebLayer> web_layer_; 287 scoped_ptr<blink::WebLayer> web_layer_;
288 #endif 288 #endif
289 bool accepts_input_events_; 289 bool accepts_input_events_;
290 RenderFrame* render_frame_; 290 RenderFrameImpl* render_frame_;
291 base::WeakPtr<RenderViewImpl> render_view_; 291 base::WeakPtr<RenderViewImpl> render_view_;
292 blink::WebFrame* webframe_; 292 blink::WebFrame* webframe_;
293 293
294 WebPluginDelegate* delegate_; 294 WebPluginDelegate* delegate_;
295 295
296 // This is just a weak reference. 296 // This is just a weak reference.
297 blink::WebPluginContainer* container_; 297 blink::WebPluginContainer* container_;
298 298
299 // Unique identifier for this plugin, used to track script objects. 299 // Unique identifier for this plugin, used to track script objects.
300 struct _NPP* npp_; 300 struct _NPP* npp_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 std::vector<std::string> arg_values_; 333 std::vector<std::string> arg_values_;
334 334
335 base::WeakPtrFactory<WebPluginImpl> weak_factory_; 335 base::WeakPtrFactory<WebPluginImpl> weak_factory_;
336 336
337 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); 337 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl);
338 }; 338 };
339 339
340 } // namespace content 340 } // namespace content
341 341
342 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ 342 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/npapi/webplugin_delegate_proxy.cc ('k') | content/renderer/npapi/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698