Update function names in BrowserContextKeyedServiceFactory::GetServiceForBrowserConte...
[chromium-blink-merge.git] / content / renderer / render_widget_fullscreen.cc
blob79fc8c3dd11ee89a167707152160e50114fce0eb
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.
5 #include "content/renderer/render_widget_fullscreen.h"
7 #include "content/common/view_messages.h"
8 #include "third_party/WebKit/public/web/WebWidget.h"
10 using WebKit::WebWidget;
12 namespace content {
14 void RenderWidgetFullscreen::show(WebKit::WebNavigationPolicy) {
15 DCHECK(!did_show_) << "received extraneous Show call";
16 DCHECK_NE(MSG_ROUTING_NONE, routing_id_);
17 DCHECK_NE(MSG_ROUTING_NONE, opener_id_);
19 if (!did_show_) {
20 did_show_ = true;
21 Send(new ViewHostMsg_ShowFullscreenWidget(opener_id_, routing_id_));
22 SetPendingWindowRect(initial_pos_);
26 RenderWidgetFullscreen::RenderWidgetFullscreen(
27 const WebKit::WebScreenInfo& screen_info)
28 : RenderWidget(WebKit::WebPopupTypeNone, screen_info, false) {
31 RenderWidgetFullscreen::~RenderWidgetFullscreen() {}
33 WebWidget* RenderWidgetFullscreen::CreateWebWidget() {
34 // TODO(boliu): Handle full screen render widgets here.
35 return RenderWidget::CreateWebWidget(this);
38 bool RenderWidgetFullscreen::Init(int32 opener_id) {
39 DCHECK(!webwidget_);
41 return RenderWidget::DoInit(
42 opener_id,
43 CreateWebWidget(),
44 new ViewHostMsg_CreateFullscreenWidget(
45 opener_id, &routing_id_, &surface_id_));
48 } // namespace content