OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/tab_contents/tab_contents_view_win.h" | 5 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "chrome/browser/download/download_request_limiter.h" | 10 #include "chrome/browser/download/download_request_limiter.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags); | 175 SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags); |
176 } else { | 176 } else { |
177 // Our size isn't changing, which means SetWindowPos won't invoke | 177 // Our size isn't changing, which means SetWindowPos won't invoke |
178 // OnWindowPosChanged. We need to invoke WasSized though as the renderer may | 178 // OnWindowPosChanged. We need to invoke WasSized though as the renderer may |
179 // need to be sized. | 179 // need to be sized. |
180 WasSized(bounds.size()); | 180 WasSized(bounds.size()); |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
184 void TabContentsViewWin::Focus() { | 184 void TabContentsViewWin::Focus() { |
185 views::FocusManager* focus_manager = | |
186 views::FocusManager::GetFocusManagerForNativeView(GetNativeView()); | |
187 | |
188 if (tab_contents()->interstitial_page()) { | 185 if (tab_contents()->interstitial_page()) { |
189 tab_contents()->interstitial_page()->Focus(); | 186 tab_contents()->interstitial_page()->Focus(); |
190 return; | 187 return; |
191 } | 188 } |
192 | 189 |
193 if (tab_contents()->is_crashed() && sad_tab_ != NULL) { | 190 if (tab_contents()->is_crashed() && sad_tab_ != NULL) { |
194 sad_tab_->RequestFocus(); | 191 sad_tab_->RequestFocus(); |
195 return; | 192 return; |
196 } | 193 } |
197 | 194 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 } | 564 } |
568 return false; | 565 return false; |
569 } | 566 } |
570 | 567 |
571 void TabContentsViewWin::WheelZoom(int distance) { | 568 void TabContentsViewWin::WheelZoom(int distance) { |
572 if (tab_contents()->delegate()) { | 569 if (tab_contents()->delegate()) { |
573 bool zoom_in = distance > 0; | 570 bool zoom_in = distance > 0; |
574 tab_contents()->delegate()->ContentsZoomChange(zoom_in); | 571 tab_contents()->delegate()->ContentsZoomChange(zoom_in); |
575 } | 572 } |
576 } | 573 } |
OLD | NEW |