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

Side by Side Diff: views/widget/widget.h

Issue 141013: Relanding focus manager refactoring (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/widget/root_view.cc ('k') | views/widget/widget_win.h » ('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_WIDGET_WIDGET_H_ 5 #ifndef VIEWS_WIDGET_WIDGET_H_
6 #define VIEWS_WIDGET_WIDGET_H_ 6 #define VIEWS_WIDGET_WIDGET_H_
7 7
8 #include "base/gfx/native_widget_types.h" 8 #include "base/gfx/native_widget_types.h"
9 9
10 class ThemeProvider; 10 class ThemeProvider;
11 11
12 namespace gfx { 12 namespace gfx {
13 class Path; 13 class Path;
14 class Rect; 14 class Rect;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 18
19 class Accelerator; 19 class Accelerator;
20 class FocusManager;
20 class RootView; 21 class RootView;
21 class TooltipManager; 22 class TooltipManager;
22 class Window; 23 class Window;
23 24
24 //////////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////////
25 // 26 //
26 // Widget interface 27 // Widget interface
27 // 28 //
28 // Widget is an abstract class that defines the API that should be implemented 29 // Widget is an abstract class that defines the API that should be implemented
29 // by a native window in order to host a view hierarchy. 30 // by a native window in order to host a view hierarchy.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Returns the accelerator given a command id. Returns false if there is 99 // Returns the accelerator given a command id. Returns false if there is
99 // no accelerator associated with a given id, which is a common condition. 100 // no accelerator associated with a given id, which is a common condition.
100 virtual bool GetAccelerator(int cmd_id, 101 virtual bool GetAccelerator(int cmd_id,
101 Accelerator* accelerator) = 0; 102 Accelerator* accelerator) = 0;
102 103
103 // Returns the Window containing this Widget, or NULL if not contained in a 104 // Returns the Window containing this Widget, or NULL if not contained in a
104 // window. 105 // window.
105 virtual Window* GetWindow() { return NULL; } 106 virtual Window* GetWindow() { return NULL; }
106 virtual const Window* GetWindow() const { return NULL; } 107 virtual const Window* GetWindow() const { return NULL; }
107 108
108 // Get the theme provider. 109 // Gets the theme provider.
109 virtual ThemeProvider* GetThemeProvider() const { return NULL; } 110 virtual ThemeProvider* GetThemeProvider() const { return NULL; }
110 111
111 // Get the default theme provider; this is necessary for when a widget has 112 // Gets the default theme provider; this is necessary for when a widget has
112 // no profile (and ThemeProvider) associated with it. The default theme 113 // no profile (and ThemeProvider) associated with it. The default theme
113 // provider provides a default set of bitmaps that such widgets can use. 114 // provider provides a default set of bitmaps that such widgets can use.
114 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; } 115 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; }
116
117 // Returns the FocusManager for this widget.
118 // Note that all widgets in a widget hierarchy share the same focus manager.
119 virtual FocusManager* GetFocusManager() { return NULL; }
115 }; 120 };
116 121
117 } // namespace views 122 } // namespace views
118 123
119 #endif // VIEWS_WIDGET_WIDGET_H_ 124 #endif // VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « views/widget/root_view.cc ('k') | views/widget/widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698