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 { |
| 10 class ThemeProvider; |
| 11 } |
| 12 |
9 namespace views { | 13 namespace views { |
10 namespace internal { | 14 namespace internal { |
11 | 15 |
12 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
13 // NativeWindowDelegate interface | 17 // NativeWindowDelegate interface |
14 // | 18 // |
15 // An interface implemented by an object that receives notifications from a | 19 // An interface implemented by an object that receives notifications from a |
16 // NativeWindow implementation. | 20 // NativeWindow implementation. |
17 // | 21 // |
18 class NativeWindowDelegate { | 22 class NativeWindowDelegate { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 61 |
58 // Called just before the native window is destroyed. This is the delegate's | 62 // Called just before the native window is destroyed. This is the delegate's |
59 // last chance to do anything with the native window handle. | 63 // last chance to do anything with the native window handle. |
60 virtual void OnNativeWindowDestroying() = 0; | 64 virtual void OnNativeWindowDestroying() = 0; |
61 | 65 |
62 // Called just after the native window is destroyed. | 66 // Called just after the native window is destroyed. |
63 virtual void OnNativeWindowDestroyed() = 0; | 67 virtual void OnNativeWindowDestroyed() = 0; |
64 | 68 |
65 // Called when the native window's position or size has changed. | 69 // Called when the native window's position or size has changed. |
66 virtual void OnNativeWindowBoundsChanged() = 0; | 70 virtual void OnNativeWindowBoundsChanged() = 0; |
| 71 |
| 72 // |
| 73 virtual Window* AsWindow() = 0; |
| 74 |
| 75 // |
| 76 virtual NativeWidgetDelegate* AsNativeWidgetDelegate() = 0; |
67 }; | 77 }; |
68 | 78 |
69 } // namespace internal | 79 } // namespace internal |
70 } // namespace views | 80 } // namespace views |
71 | 81 |
72 #endif // VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ | 82 #endif // VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ |
OLD | NEW |