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_H_ | 5 #ifndef UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 6 #define UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlapp.h> | 10 #include <atlapp.h> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeMessages) | 317 MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeMessages) |
318 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeMessages) | 318 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeMessages) |
319 MESSAGE_HANDLER_EX(WM_IME_ENDCOMPOSITION, OnImeMessages) | 319 MESSAGE_HANDLER_EX(WM_IME_ENDCOMPOSITION, OnImeMessages) |
320 MESSAGE_HANDLER_EX(WM_IME_REQUEST, OnImeMessages) | 320 MESSAGE_HANDLER_EX(WM_IME_REQUEST, OnImeMessages) |
321 MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeMessages) | 321 MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeMessages) |
322 MESSAGE_HANDLER_EX(WM_CHAR, OnImeMessages) | 322 MESSAGE_HANDLER_EX(WM_CHAR, OnImeMessages) |
323 MESSAGE_HANDLER_EX(WM_SYSCHAR, OnImeMessages) | 323 MESSAGE_HANDLER_EX(WM_SYSCHAR, OnImeMessages) |
324 MESSAGE_HANDLER_EX(WM_DEADCHAR, OnImeMessages) | 324 MESSAGE_HANDLER_EX(WM_DEADCHAR, OnImeMessages) |
325 MESSAGE_HANDLER_EX(WM_SYSDEADCHAR, OnImeMessages) | 325 MESSAGE_HANDLER_EX(WM_SYSDEADCHAR, OnImeMessages) |
326 | 326 |
327 // Scroll events | |
328 MESSAGE_HANDLER_EX(WM_VSCROLL, OnScrollMessage) | |
329 MESSAGE_HANDLER_EX(WM_HSCROLL, OnScrollMessage) | |
330 | |
327 // Touch Events. | 331 // Touch Events. |
328 MESSAGE_HANDLER_EX(WM_TOUCH, OnTouchEvent) | 332 MESSAGE_HANDLER_EX(WM_TOUCH, OnTouchEvent) |
329 | 333 |
330 // Uses the general handler macro since the specific handler macro | 334 // Uses the general handler macro since the specific handler macro |
331 // MSG_WM_NCACTIVATE would convert WPARAM type to BOOL type. The high | 335 // MSG_WM_NCACTIVATE would convert WPARAM type to BOOL type. The high |
332 // word of WPARAM could be set when the window is minimized or restored. | 336 // word of WPARAM could be set when the window is minimized or restored. |
333 MESSAGE_HANDLER_EX(WM_NCACTIVATE, OnNCActivate) | 337 MESSAGE_HANDLER_EX(WM_NCACTIVATE, OnNCActivate) |
334 | 338 |
335 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. | 339 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. |
336 MSG_WM_ACTIVATEAPP(OnActivateApp) | 340 MSG_WM_ACTIVATEAPP(OnActivateApp) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 void OnSetFocus(HWND last_focused_window); | 418 void OnSetFocus(HWND last_focused_window); |
415 LRESULT OnSetIcon(UINT size_type, HICON new_icon); | 419 LRESULT OnSetIcon(UINT size_type, HICON new_icon); |
416 LRESULT OnSetText(const wchar_t* text); | 420 LRESULT OnSetText(const wchar_t* text); |
417 void OnSettingChange(UINT flags, const wchar_t* section); | 421 void OnSettingChange(UINT flags, const wchar_t* section); |
418 void OnSize(UINT param, const CSize& size); | 422 void OnSize(UINT param, const CSize& size); |
419 void OnSysCommand(UINT notification_code, const CPoint& point); | 423 void OnSysCommand(UINT notification_code, const CPoint& point); |
420 void OnThemeChanged(); | 424 void OnThemeChanged(); |
421 LRESULT OnTouchEvent(UINT message, WPARAM w_param, LPARAM l_param); | 425 LRESULT OnTouchEvent(UINT message, WPARAM w_param, LPARAM l_param); |
422 void OnWindowPosChanging(WINDOWPOS* window_pos); | 426 void OnWindowPosChanging(WINDOWPOS* window_pos); |
423 void OnWindowPosChanged(WINDOWPOS* window_pos); | 427 void OnWindowPosChanged(WINDOWPOS* window_pos); |
428 LRESULT OnScrollMessage(UINT message, WPARAM w_param, LPARAM l_param); | |
sky
2014/01/10 16:43:21
nit: keep sorted.
ananta
2014/01/10 18:59:21
Done.
| |
424 | 429 |
425 typedef std::vector<ui::TouchEvent> TouchEvents; | 430 typedef std::vector<ui::TouchEvent> TouchEvents; |
426 // Helper to handle the list of touch events passed in. We need this because | 431 // Helper to handle the list of touch events passed in. We need this because |
427 // touch events on windows don't fire if we enter a modal loop in the context | 432 // touch events on windows don't fire if we enter a modal loop in the context |
428 // of a touch event. | 433 // of a touch event. |
429 void HandleTouchEvents(const TouchEvents& touch_events); | 434 void HandleTouchEvents(const TouchEvents& touch_events); |
430 | 435 |
431 HWNDMessageHandlerDelegate* delegate_; | 436 HWNDMessageHandlerDelegate* delegate_; |
432 | 437 |
433 scoped_ptr<FullscreenHandler> fullscreen_handler_; | 438 scoped_ptr<FullscreenHandler> fullscreen_handler_; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 }; | 543 }; |
539 | 544 |
540 // This window property if set on the window does not activate the window for a | 545 // This window property if set on the window does not activate the window for a |
541 // touch based WM_MOUSEACTIVATE message. | 546 // touch based WM_MOUSEACTIVATE message. |
542 const wchar_t kIgnoreTouchMouseActivateForWindow[] = | 547 const wchar_t kIgnoreTouchMouseActivateForWindow[] = |
543 L"Chrome.IgnoreMouseActivate"; | 548 L"Chrome.IgnoreMouseActivate"; |
544 | 549 |
545 } // namespace views | 550 } // namespace views |
546 | 551 |
547 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 552 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
OLD | NEW |