| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // manager. | 90 // manager. |
| 91 virtual void HandleBeginWMSizeMove() = 0; | 91 virtual void HandleBeginWMSizeMove() = 0; |
| 92 virtual void HandleEndWMSizeMove() = 0; | 92 virtual void HandleEndWMSizeMove() = 0; |
| 93 | 93 |
| 94 // Called when the window's position changed. | 94 // Called when the window's position changed. |
| 95 virtual void HandleMove() = 0; | 95 virtual void HandleMove() = 0; |
| 96 | 96 |
| 97 // Called when the system's work area has changed. | 97 // Called when the system's work area has changed. |
| 98 virtual void HandleWorkAreaChanged() = 0; | 98 virtual void HandleWorkAreaChanged() = 0; |
| 99 | 99 |
| 100 // Called when the window's visibility changed. |visible| holds the new state. |
| 101 virtual void HandleVisibilityChanged(bool visible) = 0; |
| 102 |
| 103 // Called when the window's client size changed. |new_size| holds the new |
| 104 // size. |
| 105 virtual void HandleClientSizeChanged(const gfx::Size& new_size) = 0; |
| 106 |
| 100 // Called when focus shifted to this HWND from |last_focused_window|. | 107 // Called when focus shifted to this HWND from |last_focused_window|. |
| 101 virtual void HandleNativeFocus(HWND last_focused_window) = 0; | 108 virtual void HandleNativeFocus(HWND last_focused_window) = 0; |
| 102 | 109 |
| 103 // Called when focus shifted from the HWND to a different window. | 110 // Called when focus shifted from the HWND to a different window. |
| 104 virtual void HandleNativeBlur(HWND focused_window) = 0; | 111 virtual void HandleNativeBlur(HWND focused_window) = 0; |
| 105 | 112 |
| 113 // Called when a mouse event is received. Returns true if the event was |
| 114 // handled by the delegate. |
| 115 virtual bool HandleMouseEvent(const ui::MouseEvent& event) = 0; |
| 116 |
| 117 // Called when a key event is received. Returns true if the event was handled |
| 118 // by the delegate. |
| 119 virtual bool HandleKeyEvent(const ui::KeyEvent& event) = 0; |
| 120 |
| 106 // Called when we have detected a screen reader. | 121 // Called when we have detected a screen reader. |
| 107 virtual void HandleScreenReaderDetected() = 0; | 122 virtual void HandleScreenReaderDetected() = 0; |
| 108 | 123 |
| 109 // Called to forward a WM_NOTIFY message to the tooltip manager. | 124 // Called to forward a WM_NOTIFY message to the tooltip manager. |
| 110 virtual bool HandleTooltipNotify(int w_param, | 125 virtual bool HandleTooltipNotify(int w_param, |
| 111 NMHDR* l_param, | 126 NMHDR* l_param, |
| 112 LRESULT* l_result) = 0; | 127 LRESULT* l_result) = 0; |
| 113 | 128 |
| 129 // Called to forward mouse events to the tooltip manager. |
| 130 virtual void HandleTooltipMouseMove(UINT message, |
| 131 WPARAM w_param, |
| 132 LPARAM l_param) = 0; |
| 133 |
| 114 // This is provided for methods that need to call private methods on NWW. | 134 // This is provided for methods that need to call private methods on NWW. |
| 115 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. | 135 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. |
| 116 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; | 136 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; |
| 117 | 137 |
| 118 protected: | 138 protected: |
| 119 virtual ~HWNDMessageHandlerDelegate() {} | 139 virtual ~HWNDMessageHandlerDelegate() {} |
| 120 }; | 140 }; |
| 121 | 141 |
| 122 } // namespace views | 142 } // namespace views |
| 123 | 143 |
| 124 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 144 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
| OLD | NEW |