| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Called when focus shifted to this HWND from |last_focused_window|. | 149 // Called when focus shifted to this HWND from |last_focused_window|. |
| 150 virtual void HandleNativeFocus(HWND last_focused_window) = 0; | 150 virtual void HandleNativeFocus(HWND last_focused_window) = 0; |
| 151 | 151 |
| 152 // Called when focus shifted from the HWND to a different window. | 152 // Called when focus shifted from the HWND to a different window. |
| 153 virtual void HandleNativeBlur(HWND focused_window) = 0; | 153 virtual void HandleNativeBlur(HWND focused_window) = 0; |
| 154 | 154 |
| 155 // Called when a mouse event is received. Returns true if the event was | 155 // Called when a mouse event is received. Returns true if the event was |
| 156 // handled by the delegate. | 156 // handled by the delegate. |
| 157 virtual bool HandleMouseEvent(const ui::MouseEvent& event) = 0; | 157 virtual bool HandleMouseEvent(const ui::MouseEvent& event) = 0; |
| 158 | 158 |
| 159 // Called when a key event is received. Returns true if the event was handled | 159 // Called when a translated key event is received (i.e. post IME translation.) |
| 160 // by the delegate. | 160 // Returns true if the event was handled by the delegate. |
| 161 virtual bool HandleKeyEvent(const ui::KeyEvent& event) = 0; | 161 virtual bool HandleKeyEvent(const ui::KeyEvent& event) = 0; |
| 162 | 162 |
| 163 // Called when an untranslated key event is received (i.e. pre-IME |
| 164 // translation). Returns true if the event was sent to the input method. |
| 165 virtual bool HandleUntranslatedKeyEvent(const ui::KeyEvent& event) = 0; |
| 166 |
| 167 // Called when an IME message needs to be processed by the delegate. Returns |
| 168 // true if the event was handled and no default processing should be |
| 169 // performed. |
| 170 virtual bool HandleIMEMessage(UINT message, |
| 171 WPARAM w_param, |
| 172 LPARAM l_param, |
| 173 LRESULT* result) = 0; |
| 174 |
| 175 // Called when the system input language changes. |
| 176 virtual void HandleInputLanguageChange(DWORD character_set, |
| 177 HKL input_language_id) = 0; |
| 178 |
| 163 // Called to compel the delegate to paint |invalid_rect| accelerated. Returns | 179 // Called to compel the delegate to paint |invalid_rect| accelerated. Returns |
| 164 // true if accelerated painting was performed. | 180 // true if accelerated painting was performed. |
| 165 virtual bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) = 0; | 181 virtual bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) = 0; |
| 166 | 182 |
| 167 // Called to compel the delegate to paint using the software path. | 183 // Called to compel the delegate to paint using the software path. |
| 168 virtual void HandlePaint(gfx::Canvas* canvas) = 0; | 184 virtual void HandlePaint(gfx::Canvas* canvas) = 0; |
| 169 | 185 |
| 170 // Called when we have detected a screen reader. | 186 // Called when we have detected a screen reader. |
| 171 virtual void HandleScreenReaderDetected() = 0; | 187 virtual void HandleScreenReaderDetected() = 0; |
| 172 | 188 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 197 WPARAM w_param, | 213 WPARAM w_param, |
| 198 LPARAM l_param) = 0; | 214 LPARAM l_param) = 0; |
| 199 | 215 |
| 200 protected: | 216 protected: |
| 201 virtual ~HWNDMessageHandlerDelegate() {} | 217 virtual ~HWNDMessageHandlerDelegate() {} |
| 202 }; | 218 }; |
| 203 | 219 |
| 204 } // namespace views | 220 } // namespace views |
| 205 | 221 |
| 206 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ | 222 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_DELEGATE_H_ |
| OLD | NEW |