| 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 BubbleDelegateView; | 23 class BubbleDelegateView; |
| 23 class ClientView; | 24 class ClientView; |
| 24 class DialogDelegate; | 25 class DialogDelegate; |
| 25 class NonClientFrameView; | 26 class NonClientFrameView; |
| 26 class View; | 27 class View; |
| 27 class Widget; | 28 class Widget; |
| 28 | 29 |
| 29 // Handles events on Widgets in context-specific ways. | 30 // Handles events on Widgets in context-specific ways. |
| 30 class VIEWS_EXPORT WidgetDelegate { | 31 class VIEWS_EXPORT WidgetDelegate { |
| 31 public: | 32 public: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 44 | 45 |
| 45 // Called when the work area (the desktop area minus task bars, | 46 // Called when the work area (the desktop area minus task bars, |
| 46 // menu bars, etc.) changes in size. | 47 // menu bars, etc.) changes in size. |
| 47 virtual void OnWorkAreaChanged(); | 48 virtual void OnWorkAreaChanged(); |
| 48 | 49 |
| 49 // Returns the view that should have the focus when the widget is shown. If | 50 // Returns the view that should have the focus when the widget is shown. If |
| 50 // NULL no view is focused. | 51 // NULL no view is focused. |
| 51 virtual View* GetInitiallyFocusedView(); | 52 virtual View* GetInitiallyFocusedView(); |
| 52 | 53 |
| 53 virtual BubbleDelegateView* AsBubbleDelegate(); | 54 virtual BubbleDelegateView* AsBubbleDelegate(); |
| 55 virtual BubbleDialogDelegateView* AsBubbleDialogDelegate(); |
| 54 virtual DialogDelegate* AsDialogDelegate(); | 56 virtual DialogDelegate* AsDialogDelegate(); |
| 55 | 57 |
| 56 // Returns true if the window can be resized. | 58 // Returns true if the window can be resized. |
| 57 virtual bool CanResize() const; | 59 virtual bool CanResize() const; |
| 58 | 60 |
| 59 // Returns true if the window can be maximized. | 61 // Returns true if the window can be maximized. |
| 60 virtual bool CanMaximize() const; | 62 virtual bool CanMaximize() const; |
| 61 | 63 |
| 62 // Returns true if the window can be minimized. | 64 // Returns true if the window can be minimized. |
| 63 virtual bool CanMinimize() const; | 65 virtual bool CanMinimize() const; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // View: | 217 // View: |
| 216 const char* GetClassName() const override; | 218 const char* GetClassName() const override; |
| 217 | 219 |
| 218 private: | 220 private: |
| 219 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); | 221 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); |
| 220 }; | 222 }; |
| 221 | 223 |
| 222 } // namespace views | 224 } // namespace views |
| 223 | 225 |
| 224 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ | 226 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ |
| OLD | NEW |