| 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_
|
|
|