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_WIDGET_WIDGET_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "ui/accessibility/ax_enums.h" | 12 #include "ui/accessibility/ax_enums.h" |
13 #include "ui/base/ui_base_types.h" | 13 #include "ui/base/ui_base_types.h" |
14 #include "ui/views/view.h" | 14 #include "ui/views/view.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class ImageSkia; | 17 class ImageSkia; |
18 class Rect; | 18 class Rect; |
19 } | 19 } |
20 | 20 |
21 namespace views { | 21 namespace views { |
22 class BubbleDialogDelegateView; | 22 class BubbleDialogDelegateView; |
23 class BubbleDelegateView; | |
24 class ClientView; | 23 class ClientView; |
25 class DialogDelegate; | 24 class DialogDelegate; |
26 class NonClientFrameView; | 25 class NonClientFrameView; |
27 class View; | 26 class View; |
28 class Widget; | 27 class Widget; |
29 | 28 |
30 // Handles events on Widgets in context-specific ways. | 29 // Handles events on Widgets in context-specific ways. |
31 class VIEWS_EXPORT WidgetDelegate { | 30 class VIEWS_EXPORT WidgetDelegate { |
32 public: | 31 public: |
33 WidgetDelegate(); | 32 WidgetDelegate(); |
(...skipping 10 matching lines...) Expand all Loading... |
44 virtual void OnDisplayChanged(); | 43 virtual void OnDisplayChanged(); |
45 | 44 |
46 // Called when the work area (the desktop area minus task bars, | 45 // Called when the work area (the desktop area minus task bars, |
47 // menu bars, etc.) changes in size. | 46 // menu bars, etc.) changes in size. |
48 virtual void OnWorkAreaChanged(); | 47 virtual void OnWorkAreaChanged(); |
49 | 48 |
50 // Returns the view that should have the focus when the widget is shown. If | 49 // Returns the view that should have the focus when the widget is shown. If |
51 // NULL no view is focused. | 50 // NULL no view is focused. |
52 virtual View* GetInitiallyFocusedView(); | 51 virtual View* GetInitiallyFocusedView(); |
53 | 52 |
54 virtual BubbleDelegateView* AsBubbleDelegate(); | |
55 virtual BubbleDialogDelegateView* AsBubbleDialogDelegate(); | 53 virtual BubbleDialogDelegateView* AsBubbleDialogDelegate(); |
56 virtual DialogDelegate* AsDialogDelegate(); | 54 virtual DialogDelegate* AsDialogDelegate(); |
57 | 55 |
58 // Returns true if the window can be resized. | 56 // Returns true if the window can be resized. |
59 virtual bool CanResize() const; | 57 virtual bool CanResize() const; |
60 | 58 |
61 // Returns true if the window can be maximized. | 59 // Returns true if the window can be maximized. |
62 virtual bool CanMaximize() const; | 60 virtual bool CanMaximize() const; |
63 | 61 |
64 // Returns true if the window can be minimized. | 62 // Returns true if the window can be minimized. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // View: | 215 // View: |
218 const char* GetClassName() const override; | 216 const char* GetClassName() const override; |
219 | 217 |
220 private: | 218 private: |
221 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); | 219 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); |
222 }; | 220 }; |
223 | 221 |
224 } // namespace views | 222 } // namespace views |
225 | 223 |
226 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 224 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
OLD | NEW |