| 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/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/l10n_util_win.h" | 9 #include "app/l10n_util_win.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 return parent; | 399 return parent; |
| 400 } | 400 } |
| 401 | 401 |
| 402 void RenderWidgetHostViewWin::Focus() { | 402 void RenderWidgetHostViewWin::Focus() { |
| 403 if (IsWindow()) | 403 if (IsWindow()) |
| 404 SetFocus(); | 404 SetFocus(); |
| 405 } | 405 } |
| 406 | 406 |
| 407 void RenderWidgetHostViewWin::Blur() { | 407 void RenderWidgetHostViewWin::Blur() { |
| 408 views::FocusManager* focus_manager = | 408 views::FocusManager* focus_manager = |
| 409 views::FocusManager::GetFocusManager(GetParent()); | 409 views::FocusManager::GetFocusManagerForNativeView(m_hWnd); |
| 410 // We don't have a FocusManager if we are hidden. | 410 // We don't have a FocusManager if we are hidden. |
| 411 if (focus_manager && render_widget_host_->CanBlur()) | 411 if (focus_manager && render_widget_host_->CanBlur()) |
| 412 focus_manager->ClearFocus(); | 412 focus_manager->ClearFocus(); |
| 413 } | 413 } |
| 414 | 414 |
| 415 bool RenderWidgetHostViewWin::HasFocus() { | 415 bool RenderWidgetHostViewWin::HasFocus() { |
| 416 return ::GetFocus() == m_hWnd; | 416 return ::GetFocus() == m_hWnd; |
| 417 } | 417 } |
| 418 | 418 |
| 419 void RenderWidgetHostViewWin::Show() { | 419 void RenderWidgetHostViewWin::Show() { |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 // WM_LBUTTONDOWN. | 1318 // WM_LBUTTONDOWN. |
| 1319 SetFocus(); | 1319 SetFocus(); |
| 1320 } | 1320 } |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 void RenderWidgetHostViewWin::ShutdownHost() { | 1323 void RenderWidgetHostViewWin::ShutdownHost() { |
| 1324 shutdown_factory_.RevokeAll(); | 1324 shutdown_factory_.RevokeAll(); |
| 1325 render_widget_host_->Shutdown(); | 1325 render_widget_host_->Shutdown(); |
| 1326 // Do not touch any members at this point, |this| has been deleted. | 1326 // Do not touch any members at this point, |this| has been deleted. |
| 1327 } | 1327 } |
| OLD | NEW |