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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 ShowCreatedWidget(route_id, false, initial_pos); | 1515 ShowCreatedWidget(route_id, false, initial_pos); |
1516 } | 1516 } |
1517 | 1517 |
1518 void WebContentsImpl::ShowCreatedFullscreenWidget(int route_id) { | 1518 void WebContentsImpl::ShowCreatedFullscreenWidget(int route_id) { |
1519 ShowCreatedWidget(route_id, true, gfx::Rect()); | 1519 ShowCreatedWidget(route_id, true, gfx::Rect()); |
1520 } | 1520 } |
1521 | 1521 |
1522 void WebContentsImpl::ShowCreatedWidget(int route_id, | 1522 void WebContentsImpl::ShowCreatedWidget(int route_id, |
1523 bool is_fullscreen, | 1523 bool is_fullscreen, |
1524 const gfx::Rect& initial_pos) { | 1524 const gfx::Rect& initial_pos) { |
1525 if (delegate_) | |
1526 delegate_->RenderWidgetShowing(); | |
1527 | |
1528 RenderWidgetHostViewPort* widget_host_view = | 1525 RenderWidgetHostViewPort* widget_host_view = |
1529 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); | 1526 RenderWidgetHostViewPort::FromRWHV(GetCreatedWidget(route_id)); |
1530 if (!widget_host_view) | 1527 if (!widget_host_view) |
1531 return; | 1528 return; |
1532 if (is_fullscreen) { | 1529 if (is_fullscreen) { |
1533 DCHECK_EQ(MSG_ROUTING_NONE, fullscreen_widget_routing_id_); | 1530 DCHECK_EQ(MSG_ROUTING_NONE, fullscreen_widget_routing_id_); |
1534 fullscreen_widget_routing_id_ = route_id; | 1531 fullscreen_widget_routing_id_ = route_id; |
1535 if (delegate_ && delegate_->EmbedsFullscreenWidget()) { | 1532 if (delegate_ && delegate_->EmbedsFullscreenWidget()) { |
1536 widget_host_view->InitAsChild(GetRenderWidgetHostView()->GetNativeView()); | 1533 widget_host_view->InitAsChild(GetRenderWidgetHostView()->GetNativeView()); |
1537 delegate_->ToggleFullscreenModeForTab(this, true); | 1534 delegate_->ToggleFullscreenModeForTab(this, true); |
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3842 } | 3839 } |
3843 | 3840 |
3844 void WebContentsImpl::OnFrameRemoved( | 3841 void WebContentsImpl::OnFrameRemoved( |
3845 RenderViewHostImpl* render_view_host, | 3842 RenderViewHostImpl* render_view_host, |
3846 int64 frame_id) { | 3843 int64 frame_id) { |
3847 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3844 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3848 FrameDetached(render_view_host, frame_id)); | 3845 FrameDetached(render_view_host, frame_id)); |
3849 } | 3846 } |
3850 | 3847 |
3851 } // namespace content | 3848 } // namespace content |
OLD | NEW |