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

Unified Diff: content/renderer/render_view_impl.h

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to creis@'s comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.h
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 64085806118d287c739193f6de4aa3a704a384a5..1f7664b9283f7b85c1e761b3ae89e48cafebc3d2 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -92,6 +92,7 @@ class WebUIBindings;
namespace content {
class DocumentState;
+class GuestToEmbedderChannel;
class NavigationState;
class P2PSocketDispatcher;
class RenderViewObserver;
@@ -110,6 +111,7 @@ namespace webkit {
namespace ppapi {
class PluginInstance;
+class WebPluginImpl;
} // namespace ppapi
} // namespace webkit
@@ -200,7 +202,7 @@ class RenderViewImpl : public RenderWidget,
bool swapped_out,
int32 next_page_id,
const WebKit::WebScreenInfo& screen_info,
- bool guest,
+ content::GuestToEmbedderChannel* guest_to_embedder_channel,
AccessibilityMode accessibility_mode);
// Returns the RenderViewImpl containing the given WebView.
@@ -261,7 +263,25 @@ class RenderViewImpl : public RenderWidget,
// Sets whether the renderer should report load progress to the browser.
void SetReportLoadProgressEnabled(bool enabled);
- bool guest() const { return guest_; }
+ content::GuestToEmbedderChannel*
+ guest_to_embedder_channel() const { return guest_to_embedder_channel_; }
+ PP_Instance guest_pp_instance() const { return guest_pp_instance_; }
+ void set_guest_graphics_resource(const ppapi::HostResource& resource) {
+ guest_graphics_resource_ = resource;
+ }
+ const ppapi::HostResource& guest_graphics_resource() const {
+ return guest_graphics_resource_;
+ }
+
+ // Once the browser plugin embedder has connected to this guest, and is
+ // ready to paint, it informs the guest through GuestReady to begin
+ // compositing.
+ void GuestReady(PP_Instance instance);
+
+ webkit::ppapi::WebPluginImpl* CreateBrowserPlugin(
+ const IPC::ChannelHandle& channel_handle,
+ int guest_process_id,
+ const WebKit::WebPluginParams& params);
void LoadNavigationErrorPage(
WebKit::WebFrame* frame,
@@ -758,7 +778,7 @@ class RenderViewImpl : public RenderWidget,
bool swapped_out,
int32 next_page_id,
const WebKit::WebScreenInfo& screen_info,
- bool guest,
+ content::GuestToEmbedderChannel* guest_to_embedder_channel,
AccessibilityMode accessibility_mode);
// Do not delete directly. This class is reference counted.
@@ -1337,8 +1357,22 @@ class RenderViewImpl : public RenderWidget,
// DOM automation bindings are enabled.
scoped_ptr<DomAutomationController> dom_automation_controller_;
- // Indicates whether this RenderView is a guest of another RenderView.
- bool guest_;
+ // Channel for communication with embedding renderer, if it exists.
+ scoped_refptr<content::GuestToEmbedderChannel> guest_to_embedder_channel_;
+
+ // The pepper instance identifer for this guest RenderView.
+ PP_Instance guest_pp_instance_;
+
+ // The ppapi::HostResource associated with the on-screen context for this
+ // guest RenderView.
+ ppapi::HostResource guest_graphics_resource_;
+
+ // This graphics context is initialized once GuestReady() is called.
+ WebGraphicsContext3DCommandBufferImpl* guest_uninitialized_context_;
+
+ // These are the attributes originally passed into createGraphicsContext3D
+ // before the guest_to_embedder_channel was ready.
+ WebKit::WebGraphicsContext3D::Attributes guest_attributes_;
// The accessibility mode.
AccessibilityMode accessibility_mode_;
« 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