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_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
6 #define UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
7 | 7 |
8 #include "ui/views/views_export.h" | 8 #include "ui/views/views_export.h" |
9 | 9 |
10 namespace views { | 10 namespace views { |
11 | 11 |
| 12 class InputMethod; |
12 class NativeWidgetWin; | 13 class NativeWidgetWin; |
13 | 14 |
14 // Implemented by the object that uses the HWNDMessageHandler to handle | 15 // Implemented by the object that uses the HWNDMessageHandler to handle |
15 // notifications from the underlying HWND and service requests for data. | 16 // notifications from the underlying HWND and service requests for data. |
16 class VIEWS_EXPORT HWNDMessageHandlerDelegate { | 17 class VIEWS_EXPORT HWNDMessageHandlerDelegate { |
17 public: | 18 public: |
18 virtual bool IsWidgetWindow() const = 0; | 19 virtual bool IsWidgetWindow() const = 0; |
19 | 20 |
20 // TODO(beng): resolve this more satisfactorily vis-a-vis ShouldUseNativeFrame | 21 // TODO(beng): resolve this more satisfactorily vis-a-vis ShouldUseNativeFrame |
21 // to avoid confusion. | 22 // to avoid confusion. |
22 virtual bool IsUsingCustomFrame() const = 0; | 23 virtual bool IsUsingCustomFrame() const = 0; |
23 | 24 |
| 25 virtual InputMethod* GetInputMethod() = 0; |
| 26 |
24 // TODO(beng): Investigate migrating these methods to On* prefixes once | 27 // TODO(beng): Investigate migrating these methods to On* prefixes once |
25 // HWNDMessageHandler is the WindowImpl. | 28 // HWNDMessageHandler is the WindowImpl. |
26 | 29 |
27 // Called when another app was activated. | 30 // Called when another app was activated. |
28 virtual void HandleAppDeactivated() = 0; | 31 virtual void HandleAppDeactivated() = 0; |
29 | 32 |
30 // Called when a well known "app command" from the system was performed. | 33 // Called when a well known "app command" from the system was performed. |
31 // Returns true if the command was handled. | 34 // Returns true if the command was handled. |
32 virtual bool HandleAppCommand(short command) = 0; | 35 virtual bool HandleAppCommand(short command) = 0; |
33 | 36 |
(...skipping 14 matching lines...) Expand all Loading... |
48 virtual void HandleDisplayChange() = 0; | 51 virtual void HandleDisplayChange() = 0; |
49 | 52 |
50 // Called when the system changes from glass to non-glass or vice versa. | 53 // Called when the system changes from glass to non-glass or vice versa. |
51 virtual void HandleGlassModeChange() = 0; | 54 virtual void HandleGlassModeChange() = 0; |
52 | 55 |
53 // Called when the user begins or ends a size/move operation using the window | 56 // Called when the user begins or ends a size/move operation using the window |
54 // manager. | 57 // manager. |
55 virtual void HandleBeginWMSizeMove() = 0; | 58 virtual void HandleBeginWMSizeMove() = 0; |
56 virtual void HandleEndWMSizeMove() = 0; | 59 virtual void HandleEndWMSizeMove() = 0; |
57 | 60 |
| 61 // Called when the window's position changed. |
| 62 virtual void HandleMove() = 0; |
| 63 |
58 // This is provided for methods that need to call private methods on NWW. | 64 // This is provided for methods that need to call private methods on NWW. |
59 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. | 65 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. |
60 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; | 66 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; |
61 | 67 |
62 protected: | 68 protected: |
63 virtual ~HWNDMessageHandlerDelegate() {} | 69 virtual ~HWNDMessageHandlerDelegate() {} |
64 }; | 70 }; |
65 | 71 |
66 } // namespace views | 72 } // namespace views |
67 | 73 |
68 #endif // UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 74 #endif // UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
OLD | NEW |