OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_NATIVE_WIDGET_DELEGATE_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
6 #define VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace gfx { | 9 namespace gfx { |
10 class Canvas; | 10 class Canvas; |
11 class Size; | 11 class Size; |
12 } | 12 } |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
18 // NativeWidgetDelegate | 18 // NativeWidgetDelegate |
19 // | 19 // |
20 // An interface implemented by the object that handles events sent by a | 20 // An interface implemented by the object that handles events sent by a |
21 // NativeWidget implementation. | 21 // NativeWidget implementation. |
22 // | 22 // |
23 class NativeWidgetDelegate { | 23 class NativeWidgetDelegate { |
24 public: | 24 public: |
25 virtual ~NativeWidgetDelegate() {} | 25 virtual ~NativeWidgetDelegate() {} |
26 | 26 |
| 27 // Returns true if the window is modal. |
| 28 virtual bool IsModal() const = 0; |
| 29 |
| 30 // Returns true if the window is a dialog box. |
| 31 virtual bool IsDialogBox() const = 0; |
| 32 |
27 // Returns true if the window can be activated. | 33 // Returns true if the window can be activated. |
28 virtual bool CanActivate() const = 0; | 34 virtual bool CanActivate() const = 0; |
29 | 35 |
30 virtual bool IsInactiveRenderingDisabled() const = 0; | 36 virtual bool IsInactiveRenderingDisabled() const = 0; |
31 virtual void EnableInactiveRendering() = 0; | 37 virtual void EnableInactiveRendering() = 0; |
32 | 38 |
33 // Called when the activation state of a window has changed. | 39 // Called when the activation state of a window has changed. |
34 virtual void OnNativeWidgetActivationChanged(bool active) = 0; | 40 virtual void OnNativeWidgetActivationChanged(bool active) = 0; |
35 | 41 |
36 // Called when native focus moves from one native view to another. | 42 // Called when native focus moves from one native view to another. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 89 |
84 // | 90 // |
85 virtual Widget* AsWidget() = 0; | 91 virtual Widget* AsWidget() = 0; |
86 virtual const Widget* AsWidget() const = 0; | 92 virtual const Widget* AsWidget() const = 0; |
87 }; | 93 }; |
88 | 94 |
89 } // namespace internal | 95 } // namespace internal |
90 } // namespace views | 96 } // namespace views |
91 | 97 |
92 #endif // VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 98 #endif // VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
OLD | NEW |