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