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_WINDOW_DELEGATE_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ |
6 #define VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ | 6 #define VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 class ThemeProvider; | 10 class ThemeProvider; |
11 } | 11 } |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
17 // NativeWindowDelegate interface | 17 // NativeWindowDelegate interface |
18 // | 18 // |
19 // An interface implemented by an object that receives notifications from a | 19 // An interface implemented by an object that receives notifications from a |
20 // NativeWindow implementation. | 20 // NativeWindow implementation. |
21 // | 21 // |
22 class NativeWindowDelegate { | 22 class NativeWindowDelegate { |
23 public: | 23 public: |
24 virtual ~NativeWindowDelegate() {} | 24 virtual ~NativeWindowDelegate() {} |
25 | 25 |
26 // Returns true if the window is modal. | |
27 virtual bool IsModal() const = 0; | |
28 | |
29 // Returns true if the window is a dialog box. | |
30 virtual bool IsDialogBox() const = 0; | |
31 | |
32 // Called just after the NativeWindow has been created. | |
33 virtual void OnNativeWindowCreated(const gfx::Rect& bounds) = 0; | |
34 | |
35 // | 26 // |
36 virtual Window* AsWindow() = 0; | 27 virtual Window* AsWindow() = 0; |
37 | 28 |
38 // | 29 // |
39 virtual NativeWidgetDelegate* AsNativeWidgetDelegate() = 0; | 30 virtual NativeWidgetDelegate* AsNativeWidgetDelegate() = 0; |
40 }; | 31 }; |
41 | 32 |
42 } // namespace internal | 33 } // namespace internal |
43 } // namespace views | 34 } // namespace views |
44 | 35 |
45 #endif // VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ | 36 #endif // VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ |
OLD | NEW |