| 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 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual bool IsUsingCustomFrame() const = 0; | 30 virtual bool IsUsingCustomFrame() const = 0; |
| 31 | 31 |
| 32 virtual void SchedulePaint() = 0; | 32 virtual void SchedulePaint() = 0; |
| 33 virtual void EnableInactiveRendering() = 0; | 33 virtual void EnableInactiveRendering() = 0; |
| 34 virtual bool IsInactiveRenderingDisabled() = 0; | 34 virtual bool IsInactiveRenderingDisabled() = 0; |
| 35 | 35 |
| 36 virtual bool CanResize() const = 0; | 36 virtual bool CanResize() const = 0; |
| 37 virtual bool CanMaximize() const = 0; | 37 virtual bool CanMaximize() const = 0; |
| 38 virtual bool CanActivate() const = 0; | 38 virtual bool CanActivate() const = 0; |
| 39 | 39 |
| 40 virtual bool WidgetSizeIsClientSize() const = 0; |
| 41 |
| 40 // Returns true if the delegate has a focus saving mechanism that should be | 42 // Returns true if the delegate has a focus saving mechanism that should be |
| 41 // used when the window is activated and deactivated. | 43 // used when the window is activated and deactivated. |
| 42 virtual bool CanSaveFocus() const = 0; | 44 virtual bool CanSaveFocus() const = 0; |
| 43 virtual void SaveFocusOnDeactivate() = 0; | 45 virtual void SaveFocusOnDeactivate() = 0; |
| 44 virtual void RestoreFocusOnActivate() = 0; | 46 virtual void RestoreFocusOnActivate() = 0; |
| 45 virtual void RestoreFocusOnEnable() = 0; | 47 virtual void RestoreFocusOnEnable() = 0; |
| 46 | 48 |
| 47 // Returns true if the delegate represents a modal window. | 49 // Returns true if the delegate represents a modal window. |
| 48 virtual bool IsModal() const = 0; | 50 virtual bool IsModal() const = 0; |
| 49 | 51 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // Called to forward a WM_NOTIFY message to the tooltip manager. | 174 // Called to forward a WM_NOTIFY message to the tooltip manager. |
| 173 virtual bool HandleTooltipNotify(int w_param, | 175 virtual bool HandleTooltipNotify(int w_param, |
| 174 NMHDR* l_param, | 176 NMHDR* l_param, |
| 175 LRESULT* l_result) = 0; | 177 LRESULT* l_result) = 0; |
| 176 | 178 |
| 177 // Called to forward mouse events to the tooltip manager. | 179 // Called to forward mouse events to the tooltip manager. |
| 178 virtual void HandleTooltipMouseMove(UINT message, | 180 virtual void HandleTooltipMouseMove(UINT message, |
| 179 WPARAM w_param, | 181 WPARAM w_param, |
| 180 LPARAM l_param) = 0; | 182 LPARAM l_param) = 0; |
| 181 | 183 |
| 184 // Catch-all message handling and filtering. Called before |
| 185 // HWNDMessageHandler's built-in handling, which may pre-empt some |
| 186 // expectations in Views/Aura if messages are consumed. Returns true if the |
| 187 // message was consumed by the delegate and should not be processed further |
| 188 // by the HWNDMessageHandler. In this case, |result| is returned. |result| is |
| 189 // not modified otherwise. |
| 190 virtual bool PreHandleMSG(UINT message, |
| 191 WPARAM w_param, |
| 192 LPARAM l_param, |
| 193 LRESULT* result) = 0; |
| 194 |
| 195 // Like PreHandleMSG, but called after HWNDMessageHandler's built-in handling |
| 196 // has run and after DefWindowProc. |
| 197 virtual void PostHandleMSG(UINT message, |
| 198 WPARAM w_param, |
| 199 LPARAM l_param) = 0; |
| 200 |
| 182 // This is provided for methods that need to call private methods on NWW. | 201 // This is provided for methods that need to call private methods on NWW. |
| 183 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. | 202 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. |
| 184 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; | 203 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; |
| 185 | 204 |
| 186 protected: | 205 protected: |
| 187 virtual ~HWNDMessageHandlerDelegate() {} | 206 virtual ~HWNDMessageHandlerDelegate() {} |
| 188 }; | 207 }; |
| 189 | 208 |
| 190 } // namespace views | 209 } // namespace views |
| 191 | 210 |
| 192 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 211 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
| OLD | NEW |