OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_VIEWS_DELEGATE_H_ | 5 #ifndef UI_VIEWS_VIEWS_DELEGATE_H_ |
6 #define UI_VIEWS_VIEWS_DELEGATE_H_ | 6 #define UI_VIEWS_VIEWS_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 15 matching lines...) Expand all Loading... |
26 class WebContents; | 26 class WebContents; |
27 class BrowserContext; | 27 class BrowserContext; |
28 class SiteInstance; | 28 class SiteInstance; |
29 } | 29 } |
30 | 30 |
31 namespace gfx { | 31 namespace gfx { |
32 class ImageSkia; | 32 class ImageSkia; |
33 class Rect; | 33 class Rect; |
34 } | 34 } |
35 | 35 |
| 36 namespace ui { |
| 37 class ContextFactory; |
| 38 } |
| 39 |
36 namespace views { | 40 namespace views { |
37 | 41 |
38 class NativeWidget; | 42 class NativeWidget; |
39 class NonClientFrameView; | 43 class NonClientFrameView; |
40 class ViewsTouchSelectionControllerFactory; | 44 class ViewsTouchSelectionControllerFactory; |
41 class View; | 45 class View; |
42 class Widget; | 46 class Widget; |
43 namespace internal { | 47 namespace internal { |
44 class NativeWidgetDelegate; | 48 class NativeWidgetDelegate; |
45 } | 49 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 123 |
120 // Returns the default obscured text reveal duration. | 124 // Returns the default obscured text reveal duration. |
121 virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration(); | 125 virtual base::TimeDelta GetDefaultTextfieldObscuredRevealDuration(); |
122 | 126 |
123 // Returns true if the operating system's window manager will always provide a | 127 // Returns true if the operating system's window manager will always provide a |
124 // title bar with caption buttons (ignoring the setting to | 128 // title bar with caption buttons (ignoring the setting to |
125 // |remove_standard_frame| in InitParams). If |maximized|, this applies to | 129 // |remove_standard_frame| in InitParams). If |maximized|, this applies to |
126 // maximized windows; otherwise to restored windows. | 130 // maximized windows; otherwise to restored windows. |
127 virtual bool WindowManagerProvidesTitleBar(bool maximized); | 131 virtual bool WindowManagerProvidesTitleBar(bool maximized); |
128 | 132 |
| 133 #if defined(USE_AURA) |
| 134 // Returns the context factory for new windows. |
| 135 virtual ui::ContextFactory* GetContextFactory(); |
| 136 #endif |
| 137 |
129 #if defined(OS_WIN) | 138 #if defined(OS_WIN) |
130 // Starts a query for the appbar autohide edges of the specified monitor and | 139 // Starts a query for the appbar autohide edges of the specified monitor and |
131 // returns the current value. If the query finds the edges have changed from | 140 // returns the current value. If the query finds the edges have changed from |
132 // the current value, |callback| is subsequently invoked. If the edges have | 141 // the current value, |callback| is subsequently invoked. If the edges have |
133 // not changed, |callback| is never run. | 142 // not changed, |callback| is never run. |
134 // | 143 // |
135 // The return value is a bitmask of AppbarAutohideEdge. | 144 // The return value is a bitmask of AppbarAutohideEdge. |
136 virtual int GetAppbarAutohideEdges(HMONITOR monitor, | 145 virtual int GetAppbarAutohideEdges(HMONITOR monitor, |
137 const base::Closure& callback); | 146 const base::Closure& callback); |
138 #endif | 147 #endif |
139 | 148 |
140 // The active ViewsDelegate used by the views system. | 149 // The active ViewsDelegate used by the views system. |
141 static ViewsDelegate* views_delegate; | 150 static ViewsDelegate* views_delegate; |
142 | 151 |
143 private: | 152 private: |
144 scoped_ptr<ViewsTouchSelectionControllerFactory> views_tsc_factory_; | 153 scoped_ptr<ViewsTouchSelectionControllerFactory> views_tsc_factory_; |
145 | 154 |
146 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); | 155 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); |
147 }; | 156 }; |
148 | 157 |
149 } // namespace views | 158 } // namespace views |
150 | 159 |
151 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 160 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |