diff options
author | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 16:13:18 +0000 |
---|---|---|
committer | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 16:13:18 +0000 |
commit | 48495594c601e34b8caef655395bddaacc0cd967 (patch) | |
tree | bc6778bc953eb812f34c2bde3c44ab4449c16034 /chrome/browser/renderer_host/render_view_host.cc | |
parent | 3deb16cc9c3938cbe4e496930ff428389f8b35d1 (diff) | |
download | chromium_src-48495594c601e34b8caef655395bddaacc0cd967.zip chromium_src-48495594c601e34b8caef655395bddaacc0cd967.tar.gz chromium_src-48495594c601e34b8caef655395bddaacc0cd967.tar.bz2 |
Use RenderWidget(Host) for full screen
Add RenderWidgetFullscreen(Host) subclasses, InitAsFullscreen method
to RenderWidgetHostView, and add two new ipc messages for creating
and showing full screen.
Add createFullscreenWindow to RenderView that creates RenderWidgetFullscreen
and sends message to browser which eventually creates RenderWidgetFullscreenHost.
The show method on RenderWidgetFullscreen sends message to parent
RenderViewHost in browser, which calls InitAsFullscreen on the view.
BUG=16735
TEST=RenderViewHostTest.CreateFullscreenWidget
Review URL: http://codereview.chromium.org/3055009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_view_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 2d0c4b2..9f1ea87 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -712,6 +712,8 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP_EX(RenderViewHost, msg, msg_is_ok) IPC_MESSAGE_HANDLER(ViewHostMsg_ShowView, OnMsgShowView) IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnMsgShowWidget) + IPC_MESSAGE_HANDLER(ViewHostMsg_ShowFullscreenWidget, + OnMsgShowFullscreenWidget) IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunModal, OnMsgRunModal) IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnMsgRenderViewReady) IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnMsgRenderViewGone) @@ -894,6 +896,13 @@ void RenderViewHost::CreateNewWidget(int route_id, view->CreateNewWidget(route_id, popup_type); } +void RenderViewHost::CreateNewFullscreenWidget( + int route_id, WebKit::WebPopupType popup_type) { + RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); + if (view) + view->CreateNewFullscreenWidget(route_id, popup_type); +} + void RenderViewHost::OnMsgShowView(int route_id, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, @@ -914,6 +923,14 @@ void RenderViewHost::OnMsgShowWidget(int route_id, } } +void RenderViewHost::OnMsgShowFullscreenWidget(int route_id) { + RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); + if (view) { + view->ShowCreatedFullscreenWidget(route_id); + Send(new ViewMsg_Move_ACK(route_id)); + } +} + void RenderViewHost::OnMsgRunModal(IPC::Message* reply_msg) { DCHECK(!run_modal_reply_msg_); run_modal_reply_msg_ = reply_msg; |