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_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 6 #define UI_VIEWS_WIN_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 gfx { | 10 namespace gfx { |
11 class Insets; | 11 class Insets; |
12 class Path; | 12 class Path; |
13 class Point; | 13 class Point; |
14 class Size; | 14 class Size; |
15 } | 15 } |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 class Accelerator; | 18 class Accelerator; |
| 19 class InputMethod; |
19 class KeyEvent; | 20 class KeyEvent; |
20 class MouseEvent; | 21 class MouseEvent; |
21 class TouchEvent; | 22 class TouchEvent; |
22 } | 23 } |
23 | 24 |
24 namespace views { | 25 namespace views { |
25 | 26 |
26 enum class FrameMode { | 27 enum class FrameMode { |
27 SYSTEM_DRAWN, // "glass" frame | 28 SYSTEM_DRAWN, // "glass" frame |
28 SYSTEM_DRAWN_NO_CONTROLS, // "glass" frame but with custom window controls | 29 SYSTEM_DRAWN_NO_CONTROLS, // "glass" frame but with custom window controls |
29 CUSTOM_DRAWN // "opaque" frame | 30 CUSTOM_DRAWN // "opaque" frame |
30 }; | 31 }; |
31 | 32 |
32 // Implemented by the object that uses the HWNDMessageHandler to handle | 33 // Implemented by the object that uses the HWNDMessageHandler to handle |
33 // notifications from the underlying HWND and service requests for data. | 34 // notifications from the underlying HWND and service requests for data. |
34 class VIEWS_EXPORT HWNDMessageHandlerDelegate { | 35 class VIEWS_EXPORT HWNDMessageHandlerDelegate { |
35 public: | 36 public: |
| 37 // Returns the input method currently used in this window. |
| 38 virtual ui::InputMethod* GetHWNDMessageDelegateInputMethod() = 0; |
| 39 |
36 // True if the widget associated with this window has a non-client view. | 40 // True if the widget associated with this window has a non-client view. |
37 virtual bool HasNonClientView() const = 0; | 41 virtual bool HasNonClientView() const = 0; |
38 | 42 |
39 // Returns who we want to be drawing the frame. Either the system (Windows) | 43 // Returns who we want to be drawing the frame. Either the system (Windows) |
40 // will handle it or Chrome will custom draw it. | 44 // will handle it or Chrome will custom draw it. |
41 virtual FrameMode GetFrameMode() const = 0; | 45 virtual FrameMode GetFrameMode() const = 0; |
42 | 46 |
43 // True if a frame should be drawn. This will return true for some windows | 47 // True if a frame should be drawn. This will return true for some windows |
44 // that don't have a visible frame. Those usually have the WS_POPUP style, for | 48 // that don't have a visible frame. Those usually have the WS_POPUP style, for |
45 // which Windows will remove the frame automatically if the frame mode is | 49 // which Windows will remove the frame automatically if the frame mode is |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // Called when the window scale factor has changed. | 249 // Called when the window scale factor has changed. |
246 virtual void HandleWindowScaleFactorChanged(float window_scale_factor) = 0; | 250 virtual void HandleWindowScaleFactorChanged(float window_scale_factor) = 0; |
247 | 251 |
248 protected: | 252 protected: |
249 virtual ~HWNDMessageHandlerDelegate() {} | 253 virtual ~HWNDMessageHandlerDelegate() {} |
250 }; | 254 }; |
251 | 255 |
252 } // namespace views | 256 } // namespace views |
253 | 257 |
254 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 258 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
OLD | NEW |