OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_widget_fullscreen.h" | 5 #include "content/renderer/render_widget_fullscreen.h" |
6 | 6 |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "third_party/WebKit/public/web/WebWidget.h" | 8 #include "third_party/WebKit/public/web/WebWidget.h" |
9 | 9 |
10 using blink::WebWidget; | 10 using blink::WebWidget; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 void RenderWidgetFullscreen::show(blink::WebNavigationPolicy) { | 14 void RenderWidgetFullscreen::show(blink::WebNavigationPolicy) { |
15 DCHECK(!did_show_) << "received extraneous Show call"; | 15 DCHECK(!did_show_) << "received extraneous Show call"; |
16 DCHECK_NE(MSG_ROUTING_NONE, routing_id()); | 16 DCHECK_NE(MSG_ROUTING_NONE, routing_id()); |
17 DCHECK_NE(MSG_ROUTING_NONE, opener_id_); | 17 DCHECK_NE(MSG_ROUTING_NONE, opener_id_); |
18 | 18 |
19 if (!did_show_) { | 19 if (!did_show_) { |
20 did_show_ = true; | 20 did_show_ = true; |
21 Send(new ViewHostMsg_ShowFullscreenWidget(opener_id_, routing_id())); | 21 Send(new ViewHostMsg_ShowFullscreenWidget(opener_id_, routing_id())); |
22 SetPendingWindowRect(initial_rect_); | 22 SetPendingWindowRect(initial_rect_); |
23 } | 23 } |
24 } | 24 } |
25 | 25 |
26 RenderWidgetFullscreen::RenderWidgetFullscreen( | 26 RenderWidgetFullscreen::RenderWidgetFullscreen( |
27 CompositorDependencies* compositor_deps, | 27 CompositorDependencies* compositor_deps, |
28 const blink::WebScreenInfo& screen_info) | 28 const ScreenInfo& screen_info) |
29 : RenderWidget(compositor_deps, | 29 : RenderWidget(compositor_deps, |
30 blink::WebPopupTypeNone, | 30 blink::WebPopupTypeNone, |
31 screen_info, | 31 screen_info, |
32 false, | 32 false, |
33 false, | 33 false, |
34 false) {} | 34 false) {} |
35 | 35 |
36 RenderWidgetFullscreen::~RenderWidgetFullscreen() {} | 36 RenderWidgetFullscreen::~RenderWidgetFullscreen() {} |
37 | 37 |
38 WebWidget* RenderWidgetFullscreen::CreateWebWidget() { | 38 WebWidget* RenderWidgetFullscreen::CreateWebWidget() { |
(...skipping 10 matching lines...) Expand all Loading... |
49 if (success) { | 49 if (success) { |
50 // TODO(fsamuel): This is a bit ugly. The |create_widget_message| should | 50 // TODO(fsamuel): This is a bit ugly. The |create_widget_message| should |
51 // probably be factored out of RenderWidget::DoInit. | 51 // probably be factored out of RenderWidget::DoInit. |
52 SetRoutingID(routing_id_); | 52 SetRoutingID(routing_id_); |
53 return true; | 53 return true; |
54 } | 54 } |
55 return false; | 55 return false; |
56 } | 56 } |
57 | 57 |
58 } // namespace content | 58 } // namespace content |
OLD | NEW |