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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 3033004: Revert 52600 - renderer_host: Remove CanBlur method.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 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/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/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_win.h" 8 #include "app/l10n_util_win.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 void RenderWidgetHostViewWin::Focus() { 517 void RenderWidgetHostViewWin::Focus() {
518 if (IsWindow()) 518 if (IsWindow())
519 SetFocus(); 519 SetFocus();
520 } 520 }
521 521
522 void RenderWidgetHostViewWin::Blur() { 522 void RenderWidgetHostViewWin::Blur() {
523 views::FocusManager* focus_manager = 523 views::FocusManager* focus_manager =
524 views::FocusManager::GetFocusManagerForNativeView(m_hWnd); 524 views::FocusManager::GetFocusManagerForNativeView(m_hWnd);
525 // We don't have a FocusManager if we are hidden. 525 // We don't have a FocusManager if we are hidden.
526 if (focus_manager) 526 if (focus_manager && render_widget_host_->CanBlur())
527 focus_manager->ClearFocus(); 527 focus_manager->ClearFocus();
528 } 528 }
529 529
530 bool RenderWidgetHostViewWin::HasFocus() { 530 bool RenderWidgetHostViewWin::HasFocus() {
531 return ::GetFocus() == m_hWnd; 531 return ::GetFocus() == m_hWnd;
532 } 532 }
533 533
534 void RenderWidgetHostViewWin::Show() { 534 void RenderWidgetHostViewWin::Show() {
535 DCHECK(parent_hwnd_); 535 DCHECK(parent_hwnd_);
536 DCHECK(parent_hwnd_ != GetDesktopWindow()); 536 DCHECK(parent_hwnd_ != GetDesktopWindow());
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 1717 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
1718 gfx::NativeView native_view) { 1718 gfx::NativeView native_view) {
1719 if (::IsWindow(native_view)) { 1719 if (::IsWindow(native_view)) {
1720 HANDLE raw_render_host_view = ::GetProp(native_view, 1720 HANDLE raw_render_host_view = ::GetProp(native_view,
1721 kRenderWidgetHostViewKey); 1721 kRenderWidgetHostViewKey);
1722 if (raw_render_host_view) 1722 if (raw_render_host_view)
1723 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view); 1723 return reinterpret_cast<RenderWidgetHostView*>(raw_render_host_view);
1724 } 1724 }
1725 return NULL; 1725 return NULL;
1726 } 1726 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698