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

Side by Side Diff: views/focus/focus_manager.h

Issue 114059: Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match t... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/textfield/textfield.cc ('k') | views/view_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-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 #ifndef VIEWS_FOCUS_FOCUS_MANAGER_H_ 5 #ifndef VIEWS_FOCUS_FOCUS_MANAGER_H_
6 #define VIEWS_FOCUS_FOCUS_MANAGER_H_ 6 #define VIEWS_FOCUS_FOCUS_MANAGER_H_
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 11 matching lines...) Expand all
22 // - the native focus, which is the focus that an HWND has. 22 // - the native focus, which is the focus that an HWND has.
23 // - the view focus, which is the focus that a views::View has. 23 // - the view focus, which is the focus that a views::View has.
24 // 24 //
25 // Each native view must register with their Focus Manager so the focus manager 25 // Each native view must register with their Focus Manager so the focus manager
26 // gets notified when they are focused (and keeps track of the native focus) and 26 // gets notified when they are focused (and keeps track of the native focus) and
27 // as well so that the tab key events can be intercepted. 27 // as well so that the tab key events can be intercepted.
28 // They can provide when they register a View that is kept in synch in term of 28 // They can provide when they register a View that is kept in synch in term of
29 // focus. This is used in NativeControl for example, where a View wraps an 29 // focus. This is used in NativeControl for example, where a View wraps an
30 // actual native window. 30 // actual native window.
31 // This is already done for you if you subclass the NativeControl class or if 31 // This is already done for you if you subclass the NativeControl class or if
32 // you use the HWNDView class. 32 // you use the NativeViewHost class.
33 // 33 //
34 // When creating a top window, if it derives from WidgetWin, the 34 // When creating a top window, if it derives from WidgetWin, the
35 // |has_own_focus_manager| of the Init method lets you specify whether that 35 // |has_own_focus_manager| of the Init method lets you specify whether that
36 // window should have its own focus manager (so focus traversal stays confined 36 // window should have its own focus manager (so focus traversal stays confined
37 // in that window). If you are not deriving from WidgetWin or one of its 37 // in that window). If you are not deriving from WidgetWin or one of its
38 // derived classes (Window, FramelessWindow, ConstrainedWindow), you must 38 // derived classes (Window, FramelessWindow, ConstrainedWindow), you must
39 // create a FocusManager when the window is created (it is automatically deleted 39 // create a FocusManager when the window is created (it is automatically deleted
40 // when the window is destroyed). 40 // when the window is destroyed).
41 // 41 //
42 // The FocusTraversable interface exposes the methods a class should implement 42 // The FocusTraversable interface exposes the methods a class should implement
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // The list of registered FocusChange listeners. 339 // The list of registered FocusChange listeners.
340 typedef std::vector<FocusChangeListener*> FocusChangeListenerList; 340 typedef std::vector<FocusChangeListener*> FocusChangeListenerList;
341 FocusChangeListenerList focus_change_listeners_; 341 FocusChangeListenerList focus_change_listeners_;
342 342
343 DISALLOW_COPY_AND_ASSIGN(FocusManager); 343 DISALLOW_COPY_AND_ASSIGN(FocusManager);
344 }; 344 };
345 345
346 } // namespace views 346 } // namespace views
347 347
348 #endif // VIEWS_FOCUS_FOCUS_MANAGER_H_ 348 #endif // VIEWS_FOCUS_FOCUS_MANAGER_H_
OLDNEW
« no previous file with comments | « views/controls/textfield/textfield.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698