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

Unified Diff: content/renderer/guest_render_view_observer.h

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with Tip-of-Tree Created 8 years, 9 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/gpu/webgraphicscontext3d_guest.cc ('k') | content/renderer/guest_render_view_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/guest_render_view_observer.h
diff --git a/content/renderer/guest_render_view_observer.h b/content/renderer/guest_render_view_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..77a06e6a4d3c6beb1249f3cdb8523b8289a163c8
--- /dev/null
+++ b/content/renderer/guest_render_view_observer.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_GUEST_RENDER_VIEW_OBSERVER_H_
+#define CONTENT_RENDERER_GUEST_RENDER_VIEW_OBSERVER_H_
+#pragma once
+
+#include "content/public/renderer/render_view_observer.h"
+#include "content/renderer/guest_to_host_channel.h"
+
+namespace content {
+class RenderView;
+}
+
+class GuestRenderViewObserver: public content::RenderViewObserver {
+public:
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
+
+ WebKit::WebGraphicsContext3D* GetWebGraphicsContext3D() OVERRIDE;
+
+ int routing_id() { return content::RenderViewObserver::routing_id(); }
+
+private:
+ GuestRenderViewObserver(content::RenderView* render_view);
+
+ ~GuestRenderViewObserver() { }
+
+ // This message arrives to indicate to the RenderView that it is
+ // to begin initializing itself as a pepper plugin and establish
+ // a channel with a host RenderView.
+ void OnMsgCreateChannel(base::ProcessHandle host_process_handle,
+ int renderer_id);
+
+ // This message arrives after a guest-to-host channel has been established.
+ // The host is now free to swap out the BrowserPluginPlaceholder with the
+ // real browser plugin.
+ void OnMsgGuestReady(int instance_id,
+ base::ProcessHandle process_handle,
+ const IPC::ChannelHandle& channel_handle);
+
+ void GraphicsContextCreated();
+
+ GuestToHostChannel guest_to_host_channel_;
+
+ friend class RenderViewImpl;
+ friend class GuestToHostChannel;
+};
+
+#endif // CONTENT_RENDERER_GUEST_RENDER_VIEW_OBSERVER_H_
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_guest.cc ('k') | content/renderer/guest_render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698