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

Unified Diff: views/focus/focus_manager_win.cc

Issue 140023: Reverting 18872. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/focus/focus_manager_unittest.cc ('k') | views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/focus/focus_manager_win.cc
===================================================================
--- views/focus/focus_manager_win.cc (revision 18872)
+++ views/focus/focus_manager_win.cc (working copy)
@@ -1,33 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "views/focus/focus_manager.h"
-
-#include "views/view.h"
-#include "views/widget/widget_win.h"
-
-namespace views {
-
-void FocusManager::ClearNativeFocus() {
- // Keep the top root window focused so we get keyboard events.
- ::SetFocus(widget_->GetNativeView());
-}
-
-void FocusManager::FocusNativeView(gfx::NativeView native_view) {
- // Only reset focus if hwnd is not already focused.
- if (native_view && ::GetFocus() != native_view)
- ::SetFocus(native_view);
-}
-
-// static
-FocusManager* FocusManager::GetFocusManagerForNativeView(
- gfx::NativeView native_view) {
- HWND root = ::GetAncestor(native_view, GA_ROOT);
- if (!root)
- return NULL;
- WidgetWin* widget = WidgetWin::GetWidget(root);
- return widget ? widget->GetFocusManager() : NULL;
-}
-
-} // namespace views
« no previous file with comments | « views/focus/focus_manager_unittest.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698