Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1551)

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view.cc

Issue 3201008: Revert 57094 - Making window.focus()/blur() work only when there is a user ge... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_delegate.cc ('k') | chrome/browser/views/app_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698