| 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_NATIVE_WIDGET_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // An interface implemented by the object that handles events sent by a | 38 // An interface implemented by the object that handles events sent by a |
| 39 // NativeWidget implementation. | 39 // NativeWidget implementation. |
| 40 // | 40 // |
| 41 class VIEWS_EXPORT NativeWidgetDelegate { | 41 class VIEWS_EXPORT NativeWidgetDelegate { |
| 42 public: | 42 public: |
| 43 virtual ~NativeWidgetDelegate() {} | 43 virtual ~NativeWidgetDelegate() {} |
| 44 | 44 |
| 45 // Returns true if the window is modal. | 45 // Returns true if the window is modal. |
| 46 virtual bool IsModal() const = 0; | 46 virtual bool IsModal() const = 0; |
| 47 | 47 |
| 48 virtual bool IsModalTypeChild() const = 0; |
| 49 |
| 48 // Returns true if the window is a dialog box. | 50 // Returns true if the window is a dialog box. |
| 49 virtual bool IsDialogBox() const = 0; | 51 virtual bool IsDialogBox() const = 0; |
| 50 | 52 |
| 51 // Returns true if the window can be activated. | 53 // Returns true if the window can be activated. |
| 52 virtual bool CanActivate() const = 0; | 54 virtual bool CanActivate() const = 0; |
| 53 | 55 |
| 54 // Prevents the window from being rendered as deactivated. This state is | 56 // Prevents the window from being rendered as deactivated. This state is |
| 55 // reset automatically as soon as the window becomes activated again. There is | 57 // reset automatically as soon as the window becomes activated again. There is |
| 56 // no ability to control the state through this API as this leads to sync | 58 // no ability to control the state through this API as this leads to sync |
| 57 // problems. | 59 // problems. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // later. Returns true if the initial focus has been set or the window should | 150 // later. Returns true if the initial focus has been set or the window should |
| 149 // not set the initial focus, or false if the caller should set the initial | 151 // not set the initial focus, or false if the caller should set the initial |
| 150 // focus (if any). | 152 // focus (if any). |
| 151 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0; | 153 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0; |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace internal | 156 } // namespace internal |
| 155 } // namespace views | 157 } // namespace views |
| 156 | 158 |
| 157 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 159 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
| OLD | NEW |