| OLD | NEW |
| 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 Loading... |
| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 } | 671 } |
| 672 return false; | 672 return false; |
| 673 } | 673 } |
| 674 | 674 |
| 675 void TabContentsViewWin::WheelZoom(int distance) { | 675 void TabContentsViewWin::WheelZoom(int distance) { |
| 676 if (tab_contents()->delegate()) { | 676 if (tab_contents()->delegate()) { |
| 677 bool zoom_in = distance > 0; | 677 bool zoom_in = distance > 0; |
| 678 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 678 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
| 679 } | 679 } |
| 680 } | 680 } |
| OLD | NEW |