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

Side by Side 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: Initial plumbing of a guest flag to RenderViewImpl (cleaner than early prototype) 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_GUEST_RENDER_VIEW_OBSERVER_H_
6 #define CONTENT_RENDERER_GUEST_RENDER_VIEW_OBSERVER_H_
7 #pragma once
8
9 #include "content/public/renderer/render_view_observer.h"
10 #include "content/renderer/guest_to_host_channel.h"
11
12 class RenderViewImpl;
13
14 class GuestRenderViewObserver: public content::RenderViewObserver {
15 public:
16 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
17
18 WebKit::WebGraphicsContext3D* GetWebGraphicsContext3D() OVERRIDE;
19
20 int routing_id() { return content::RenderViewObserver::routing_id(); }
21
22 private:
23 GuestRenderViewObserver(RenderViewImpl* render_view);
24
25 ~GuestRenderViewObserver() { }
26
27 // This message arrives to indicate to the RenderView that it is
28 // to begin initializing itself as a pepper plugin and establish
29 // a channel with a host RenderView.
30 void OnMsgCreateChannel(base::ProcessHandle host_process_handle,
31 int renderer_id);
32
33 // This message arrives after a guest-to-host channel has been established.
34 // The host is now free to swap out the BrowserPluginPlaceholder with the
35 // real browser plugin.
36 void OnMsgGuestReady(int instance_id,
37 base::ProcessHandle process_handle,
38 const IPC::ChannelHandle& channel_handle);
39
40 void GraphicsContextCreated();
41
42 GuestToHostChannel guest_to_host_channel_;
43
44 friend class RenderViewImpl;
45 friend class GuestToHostChannel;
46 };
47
48 #endif // CONTENT_RENDERER_GUEST_RENDER_VIEW_OBSERVER_H_
OLDNEW
« 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