| 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 InputMethodObserver; |
| 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 // For tracking the caret for accessibility. |
| 38 virtual void AddInputMethodObserver(ui::InputMethodObserver& observer) = 0; |
| 39 virtual void RemoveInputMethodObserver(ui::InputMethodObserver& observer) = 0; |
| 40 |
| 36 // True if the widget associated with this window has a non-client view. | 41 // True if the widget associated with this window has a non-client view. |
| 37 virtual bool HasNonClientView() const = 0; | 42 virtual bool HasNonClientView() const = 0; |
| 38 | 43 |
| 39 // Returns who we want to be drawing the frame. Either the system (Windows) | 44 // Returns who we want to be drawing the frame. Either the system (Windows) |
| 40 // will handle it or Chrome will custom draw it. | 45 // will handle it or Chrome will custom draw it. |
| 41 virtual FrameMode GetFrameMode() const = 0; | 46 virtual FrameMode GetFrameMode() const = 0; |
| 42 | 47 |
| 43 // True if a frame should be drawn. This will return true for some windows | 48 // 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 | 49 // 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 | 50 // 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. | 250 // Called when the window scale factor has changed. |
| 246 virtual void HandleWindowScaleFactorChanged(float window_scale_factor) = 0; | 251 virtual void HandleWindowScaleFactorChanged(float window_scale_factor) = 0; |
| 247 | 252 |
| 248 protected: | 253 protected: |
| 249 virtual ~HWNDMessageHandlerDelegate() {} | 254 virtual ~HWNDMessageHandlerDelegate() {} |
| 250 }; | 255 }; |
| 251 | 256 |
| 252 } // namespace views | 257 } // namespace views |
| 253 | 258 |
| 254 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 259 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
| OLD | NEW |