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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 9968097: Browser Plugin: Renderer-side changes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Make RefCounted<GuestToEmbedderChannel> a friend Created 8 years, 7 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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RENDER_VIEW_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 struct ViewMsg_PostMessage_Params; 85 struct ViewMsg_PostMessage_Params;
86 struct ViewMsg_StopFinding_Params; 86 struct ViewMsg_StopFinding_Params;
87 struct ViewMsg_SwapOut_Params; 87 struct ViewMsg_SwapOut_Params;
88 struct WebDropData; 88 struct WebDropData;
89 class WebIntentsHost; 89 class WebIntentsHost;
90 class WebPluginDelegateProxy; 90 class WebPluginDelegateProxy;
91 class WebUIBindings; 91 class WebUIBindings;
92 92
93 namespace content { 93 namespace content {
94 class DocumentState; 94 class DocumentState;
95 class GuestToEmbedderChannel;
95 class NavigationState; 96 class NavigationState;
96 class P2PSocketDispatcher; 97 class P2PSocketDispatcher;
97 class RenderViewObserver; 98 class RenderViewObserver;
98 class RenderViewTest; 99 class RenderViewTest;
99 struct CustomContextMenuContext; 100 struct CustomContextMenuContext;
100 struct FileChooserParams; 101 struct FileChooserParams;
101 struct SelectedFileInfo; 102 struct SelectedFileInfo;
102 } // namespace content 103 } // namespace content
103 104
104 namespace gfx { 105 namespace gfx {
105 class Point; 106 class Point;
106 class Rect; 107 class Rect;
107 } // namespace gfx 108 } // namespace gfx
108 109
109 namespace webkit { 110 namespace webkit {
110 111
111 namespace ppapi { 112 namespace ppapi {
112 class PluginInstance; 113 class PluginInstance;
114 class WebPluginImpl;
113 } // namespace ppapi 115 } // namespace ppapi
114 116
115 } // namespace webkit 117 } // namespace webkit
116 118
117 namespace webkit_glue { 119 namespace webkit_glue {
118 class ImageResourceFetcher; 120 class ImageResourceFetcher;
119 class ResourceFetcher; 121 class ResourceFetcher;
120 } 122 }
121 123
122 namespace WebKit { 124 namespace WebKit {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 const webkit_glue::WebPreferences& webkit_prefs, 195 const webkit_glue::WebPreferences& webkit_prefs,
194 SharedRenderViewCounter* counter, 196 SharedRenderViewCounter* counter,
195 int32 routing_id, 197 int32 routing_id,
196 int32 surface_id, 198 int32 surface_id,
197 int64 session_storage_namespace_id, 199 int64 session_storage_namespace_id,
198 const string16& frame_name, 200 const string16& frame_name,
199 bool is_renderer_created, 201 bool is_renderer_created,
200 bool swapped_out, 202 bool swapped_out,
201 int32 next_page_id, 203 int32 next_page_id,
202 const WebKit::WebScreenInfo& screen_info, 204 const WebKit::WebScreenInfo& screen_info,
203 bool guest, 205 content::GuestToEmbedderChannel* guest_to_embedder_channel,
204 AccessibilityMode accessibility_mode); 206 AccessibilityMode accessibility_mode);
205 207
206 // Returns the RenderViewImpl containing the given WebView. 208 // Returns the RenderViewImpl containing the given WebView.
207 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); 209 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview);
208 210
209 // May return NULL when the view is closing. 211 // May return NULL when the view is closing.
210 CONTENT_EXPORT WebKit::WebView* webview() const; 212 CONTENT_EXPORT WebKit::WebView* webview() const;
211 213
212 // WebGraphicsContext3DSwapBuffersClient implementation. 214 // WebGraphicsContext3DSwapBuffersClient implementation.
213 215
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // no other waiting items in the queue. 256 // no other waiting items in the queue.
255 // 257 //
256 // Returns true if the chooser was successfully scheduled. False means we 258 // Returns true if the chooser was successfully scheduled. False means we
257 // didn't schedule anything. 259 // didn't schedule anything.
258 bool ScheduleFileChooser(const content::FileChooserParams& params, 260 bool ScheduleFileChooser(const content::FileChooserParams& params,
259 WebKit::WebFileChooserCompletion* completion); 261 WebKit::WebFileChooserCompletion* completion);
260 262
261 // Sets whether the renderer should report load progress to the browser. 263 // Sets whether the renderer should report load progress to the browser.
262 void SetReportLoadProgressEnabled(bool enabled); 264 void SetReportLoadProgressEnabled(bool enabled);
263 265
264 bool guest() const { return guest_; } 266 content::GuestToEmbedderChannel*
267 guest_to_embedder_channel() const { return guest_to_embedder_channel_; }
268 PP_Instance guest_pp_instance() const { return guest_pp_instance_; }
269 void set_guest_graphics_resource(const ppapi::HostResource& resource) {
270 guest_graphics_resource_ = resource;
271 }
272 const ppapi::HostResource& guest_graphics_resource() const {
273 return guest_graphics_resource_;
274 }
275
276 // Once the browser plugin embedder has connected to this guest, and is
277 // ready to paint, it informs the guest through GuestReady to begin
278 // compositing.
279 void GuestReady(PP_Instance instance);
280
281 webkit::ppapi::WebPluginImpl* CreateBrowserPlugin(
282 const IPC::ChannelHandle& channel_handle,
283 int guest_process_id,
284 const WebKit::WebPluginParams& params);
265 285
266 void LoadNavigationErrorPage( 286 void LoadNavigationErrorPage(
267 WebKit::WebFrame* frame, 287 WebKit::WebFrame* frame,
268 const WebKit::WebURLRequest& failed_request, 288 const WebKit::WebURLRequest& failed_request,
269 const WebKit::WebURLError& error, 289 const WebKit::WebURLError& error,
270 const std::string& html, 290 const std::string& html,
271 bool replace); 291 bool replace);
272 292
273 // Plugin-related functions -------------------------------------------------- 293 // Plugin-related functions --------------------------------------------------
274 // (See also WebPluginPageDelegate implementation.) 294 // (See also WebPluginPageDelegate implementation.)
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 const webkit_glue::WebPreferences& webkit_prefs, 781 const webkit_glue::WebPreferences& webkit_prefs,
762 SharedRenderViewCounter* counter, 782 SharedRenderViewCounter* counter,
763 int32 routing_id, 783 int32 routing_id,
764 int32 surface_id, 784 int32 surface_id,
765 int64 session_storage_namespace_id, 785 int64 session_storage_namespace_id,
766 const string16& frame_name, 786 const string16& frame_name,
767 bool is_renderer_created, 787 bool is_renderer_created,
768 bool swapped_out, 788 bool swapped_out,
769 int32 next_page_id, 789 int32 next_page_id,
770 const WebKit::WebScreenInfo& screen_info, 790 const WebKit::WebScreenInfo& screen_info,
771 bool guest, 791 content::GuestToEmbedderChannel* guest_to_embedder_channel,
772 AccessibilityMode accessibility_mode); 792 AccessibilityMode accessibility_mode);
773 793
774 // Do not delete directly. This class is reference counted. 794 // Do not delete directly. This class is reference counted.
775 virtual ~RenderViewImpl(); 795 virtual ~RenderViewImpl();
776 796
777 void UpdateURL(WebKit::WebFrame* frame); 797 void UpdateURL(WebKit::WebFrame* frame);
778 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, 798 void UpdateTitle(WebKit::WebFrame* frame, const string16& title,
779 WebKit::WebTextDirection title_direction); 799 WebKit::WebTextDirection title_direction);
780 void UpdateSessionHistory(WebKit::WebFrame* frame); 800 void UpdateSessionHistory(WebKit::WebFrame* frame);
781 void SendUpdateState(const WebKit::WebHistoryItem& item); 801 void SendUpdateState(const WebKit::WebHistoryItem& item);
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 1358
1339 #if defined(OS_WIN) 1359 #if defined(OS_WIN)
1340 // The ID of the focused NPAPI plug-in. 1360 // The ID of the focused NPAPI plug-in.
1341 int focused_plugin_id_; 1361 int focused_plugin_id_;
1342 #endif 1362 #endif
1343 1363
1344 // Allows JS to access DOM automation. The JS object is only exposed when the 1364 // Allows JS to access DOM automation. The JS object is only exposed when the
1345 // DOM automation bindings are enabled. 1365 // DOM automation bindings are enabled.
1346 scoped_ptr<DomAutomationController> dom_automation_controller_; 1366 scoped_ptr<DomAutomationController> dom_automation_controller_;
1347 1367
1348 // Indicates whether this RenderView is a guest of another RenderView. 1368 // Channel for communication with embedding renderer, if it exists.
1349 bool guest_; 1369 scoped_refptr<content::GuestToEmbedderChannel> guest_to_embedder_channel_;
1370
1371 // The pepper instance identifer for this guest RenderView.
1372 PP_Instance guest_pp_instance_;
1373
1374 // The ppapi::HostResource associated with the on-screen context for this
1375 // guest RenderView.
1376 ppapi::HostResource guest_graphics_resource_;
1377
1378 // This graphics context is initialized once GuestReady() is called.
1379 WebGraphicsContext3DCommandBufferImpl* guest_uninitialized_context_;
1380
1381 // These are the attributes originally passed into createGraphicsContext3D
1382 // before the guest_to_embedder_channel was ready.
1383 WebKit::WebGraphicsContext3D::Attributes guest_attributes_;
1350 1384
1351 // The accessibility mode. 1385 // The accessibility mode.
1352 AccessibilityMode accessibility_mode_; 1386 AccessibilityMode accessibility_mode_;
1353 1387
1354 // NOTE: pepper_delegate_ should be last member because its constructor calls 1388 // NOTE: pepper_delegate_ should be last member because its constructor calls
1355 // AddObservers method of RenderViewImpl from c-tor. 1389 // AddObservers method of RenderViewImpl from c-tor.
1356 content::PepperPluginDelegateImpl pepper_delegate_; 1390 content::PepperPluginDelegateImpl pepper_delegate_;
1357 1391
1358 // --------------------------------------------------------------------------- 1392 // ---------------------------------------------------------------------------
1359 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1393 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1360 // sections rather than throwing it randomly at the end. If you're adding a 1394 // sections rather than throwing it randomly at the end. If you're adding a
1361 // bunch of stuff, you should probably create a helper class and put your 1395 // bunch of stuff, you should probably create a helper class and put your
1362 // data and methods on that to avoid bloating RenderView more. You can 1396 // data and methods on that to avoid bloating RenderView more. You can
1363 // use the Observer interface to filter IPC messages and receive frame change 1397 // use the Observer interface to filter IPC messages and receive frame change
1364 // notifications. 1398 // notifications.
1365 // --------------------------------------------------------------------------- 1399 // ---------------------------------------------------------------------------
1366 1400
1367 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1401 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1368 }; 1402 };
1369 1403
1370 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1404 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698