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

Side by Side Diff: views/focus/focus_manager_gtk.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « views/focus/accelerator_handler_gtk_unittest.cc ('k') | views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <gtk/gtk.h> 5 #include <gtk/gtk.h>
6 6
7 #include "views/focus/focus_manager.h" 7 #include "views/focus/focus_manager.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "views/widget/widget_gtk.h" 10 #include "views/widget/widget_gtk.h"
11 #include "views/window/window_gtk.h" 11 #include "views/window/window_gtk.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 void FocusManager::ClearNativeFocus() { 15 void FocusManager::ClearNativeFocus() {
16 static_cast<WidgetGtk*>(widget_)->ClearNativeFocus(); 16 static_cast<WidgetGtk*>(widget_->native_widget())->ClearNativeFocus();
17 } 17 }
18 18
19 void FocusManager::FocusNativeView(gfx::NativeView native_view) { 19 void FocusManager::FocusNativeView(gfx::NativeView native_view) {
20 if (native_view && !gtk_widget_is_focus(native_view)) 20 if (native_view && !gtk_widget_is_focus(native_view))
21 gtk_widget_grab_focus(native_view); 21 gtk_widget_grab_focus(native_view);
22 } 22 }
23 23
24 // static 24 // static
25 FocusManager* FocusManager::GetFocusManagerForNativeView( 25 FocusManager* FocusManager::GetFocusManagerForNativeView(
26 gfx::NativeView native_view) { 26 gfx::NativeView native_view) {
(...skipping 14 matching lines...) Expand all
41 return focus_manager; 41 return focus_manager;
42 } 42 }
43 43
44 // static 44 // static
45 FocusManager* FocusManager::GetFocusManagerForNativeWindow( 45 FocusManager* FocusManager::GetFocusManagerForNativeWindow(
46 gfx::NativeWindow native_window) { 46 gfx::NativeWindow native_window) {
47 return GetFocusManagerForNativeView(GTK_WIDGET(native_window)); 47 return GetFocusManagerForNativeView(GTK_WIDGET(native_window));
48 } 48 }
49 49
50 } // namespace views 50 } // namespace views
OLDNEW
« no previous file with comments | « views/focus/accelerator_handler_gtk_unittest.cc ('k') | views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698