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

Side by Side Diff: chrome/browser/views/tab_contents/tab_contents_view_win.cc

Issue 160206: Fix focus bug when reloading crashed tab (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/tab_contents/tab_contents_view_win.h" 5 #include "chrome/browser/views/tab_contents/tab_contents_view_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "app/gfx/canvas_paint.h" 9 #include "app/gfx/canvas_paint.h"
10 #include "app/os_exchange_data.h" 10 #include "app/os_exchange_data.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 void TabContentsViewWin::Focus() { 256 void TabContentsViewWin::Focus() {
257 views::FocusManager* focus_manager = 257 views::FocusManager* focus_manager =
258 views::FocusManager::GetFocusManagerForNativeView(GetNativeView()); 258 views::FocusManager::GetFocusManagerForNativeView(GetNativeView());
259 259
260 if (tab_contents()->interstitial_page()) { 260 if (tab_contents()->interstitial_page()) {
261 tab_contents()->interstitial_page()->Focus(); 261 tab_contents()->interstitial_page()->Focus();
262 return; 262 return;
263 } 263 }
264 264
265 if (sad_tab_.get()) { 265 if (tab_contents()->is_crashed() && sad_tab_.get()) {
266 sad_tab_->RequestFocus(); 266 sad_tab_->RequestFocus();
267 return; 267 return;
268 } 268 }
269 269
270 RenderWidgetHostView* rwhv = tab_contents()->render_widget_host_view(); 270 RenderWidgetHostView* rwhv = tab_contents()->render_widget_host_view();
271 if (rwhv) { 271 if (rwhv) {
272 ::SetFocus(rwhv->GetNativeView()); 272 ::SetFocus(rwhv->GetNativeView());
273 return; 273 return;
274 } 274 }
275 275
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 669 }
670 return false; 670 return false;
671 } 671 }
672 672
673 void TabContentsViewWin::WheelZoom(int distance) { 673 void TabContentsViewWin::WheelZoom(int distance) {
674 if (tab_contents()->delegate()) { 674 if (tab_contents()->delegate()) {
675 bool zoom_in = distance > 0; 675 bool zoom_in = distance > 0;
676 tab_contents()->delegate()->ContentsZoomChange(zoom_in); 676 tab_contents()->delegate()->ContentsZoomChange(zoom_in);
677 } 677 }
678 } 678 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698