| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents/tab_contents_view.h" | 5 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/render_process_host.h" | 7 #include "chrome/browser/renderer_host/render_process_host.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
| 9 #include "chrome/browser/renderer_host/render_widget_host.h" | 9 #include "chrome/browser/renderer_host/render_widget_host.h" |
| 10 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 10 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 void TabContentsView::ShowCreatedWidget(int route_id, | 67 void TabContentsView::ShowCreatedWidget(int route_id, |
| 68 const gfx::Rect& initial_pos) { | 68 const gfx::Rect& initial_pos) { |
| 69 RenderWidgetHostView* widget_host_view = | 69 RenderWidgetHostView* widget_host_view = |
| 70 delegate_view_helper_.GetCreatedWidget(route_id); | 70 delegate_view_helper_.GetCreatedWidget(route_id); |
| 71 ShowCreatedWidgetInternal(widget_host_view, initial_pos); | 71 ShowCreatedWidgetInternal(widget_host_view, initial_pos); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void TabContentsView::Activate() { | 74 void TabContentsView::Activate() { |
| 75 tab_contents_->Activate(); | 75 tab_contents_->delegate()->Activate(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void TabContentsView::Deactivate() { | 78 void TabContentsView::Deactivate() { |
| 79 tab_contents_->Deactivate(); | 79 tab_contents_->delegate()->Deactivate(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void TabContentsView::ShowCreatedFullscreenWidget(int route_id) { | 82 void TabContentsView::ShowCreatedFullscreenWidget(int route_id) { |
| 83 RenderWidgetHostView* widget_host_view = | 83 RenderWidgetHostView* widget_host_view = |
| 84 delegate_view_helper_.GetCreatedWidget(route_id); | 84 delegate_view_helper_.GetCreatedWidget(route_id); |
| 85 ShowCreatedFullscreenWidgetInternal(widget_host_view); | 85 ShowCreatedFullscreenWidgetInternal(widget_host_view); |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool TabContentsView::PreHandleKeyboardEvent( | 88 bool TabContentsView::PreHandleKeyboardEvent( |
| 89 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { | 89 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 void TabContentsView::ShowCreatedFullscreenWidgetInternal( | 127 void TabContentsView::ShowCreatedFullscreenWidgetInternal( |
| 128 RenderWidgetHostView* widget_host_view) { | 128 RenderWidgetHostView* widget_host_view) { |
| 129 if (tab_contents_->delegate()) | 129 if (tab_contents_->delegate()) |
| 130 tab_contents_->delegate()->RenderWidgetShowing(); | 130 tab_contents_->delegate()->RenderWidgetShowing(); |
| 131 | 131 |
| 132 widget_host_view->InitAsFullscreen(tab_contents_->GetRenderWidgetHostView()); | 132 widget_host_view->InitAsFullscreen(tab_contents_->GetRenderWidgetHostView()); |
| 133 widget_host_view->GetRenderWidgetHost()->Init(); | 133 widget_host_view->GetRenderWidgetHost()->Init(); |
| 134 } | 134 } |
| OLD | NEW |