| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeMessages) | 314 MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeMessages) |
| 315 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeMessages) | 315 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeMessages) |
| 316 MESSAGE_HANDLER_EX(WM_IME_ENDCOMPOSITION, OnImeMessages) | 316 MESSAGE_HANDLER_EX(WM_IME_ENDCOMPOSITION, OnImeMessages) |
| 317 MESSAGE_HANDLER_EX(WM_IME_REQUEST, OnImeMessages) | 317 MESSAGE_HANDLER_EX(WM_IME_REQUEST, OnImeMessages) |
| 318 MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeMessages) | 318 MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeMessages) |
| 319 MESSAGE_HANDLER_EX(WM_CHAR, OnImeMessages) | 319 MESSAGE_HANDLER_EX(WM_CHAR, OnImeMessages) |
| 320 MESSAGE_HANDLER_EX(WM_SYSCHAR, OnImeMessages) | 320 MESSAGE_HANDLER_EX(WM_SYSCHAR, OnImeMessages) |
| 321 MESSAGE_HANDLER_EX(WM_DEADCHAR, OnImeMessages) | 321 MESSAGE_HANDLER_EX(WM_DEADCHAR, OnImeMessages) |
| 322 MESSAGE_HANDLER_EX(WM_SYSDEADCHAR, OnImeMessages) | 322 MESSAGE_HANDLER_EX(WM_SYSDEADCHAR, OnImeMessages) |
| 323 | 323 |
| 324 // Scroll events |
| 325 MESSAGE_HANDLER_EX(WM_VSCROLL, OnScrollMessage) |
| 326 MESSAGE_HANDLER_EX(WM_HSCROLL, OnScrollMessage) |
| 327 |
| 324 // Touch Events. | 328 // Touch Events. |
| 325 MESSAGE_HANDLER_EX(WM_TOUCH, OnTouchEvent) | 329 MESSAGE_HANDLER_EX(WM_TOUCH, OnTouchEvent) |
| 326 | 330 |
| 327 // Uses the general handler macro since the specific handler macro | 331 // Uses the general handler macro since the specific handler macro |
| 328 // MSG_WM_NCACTIVATE would convert WPARAM type to BOOL type. The high | 332 // MSG_WM_NCACTIVATE would convert WPARAM type to BOOL type. The high |
| 329 // word of WPARAM could be set when the window is minimized or restored. | 333 // word of WPARAM could be set when the window is minimized or restored. |
| 330 MESSAGE_HANDLER_EX(WM_NCACTIVATE, OnNCActivate) | 334 MESSAGE_HANDLER_EX(WM_NCACTIVATE, OnNCActivate) |
| 331 | 335 |
| 332 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. | 336 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. |
| 333 MSG_WM_ACTIVATEAPP(OnActivateApp) | 337 MSG_WM_ACTIVATEAPP(OnActivateApp) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 void OnMoving(UINT param, const RECT* new_bounds); | 400 void OnMoving(UINT param, const RECT* new_bounds); |
| 397 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); | 401 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); |
| 398 LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); | 402 LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); |
| 399 LRESULT OnNCHitTest(const CPoint& point); | 403 LRESULT OnNCHitTest(const CPoint& point); |
| 400 void OnNCPaint(HRGN rgn); | 404 void OnNCPaint(HRGN rgn); |
| 401 LRESULT OnNCUAHDrawCaption(UINT message, WPARAM w_param, LPARAM l_param); | 405 LRESULT OnNCUAHDrawCaption(UINT message, WPARAM w_param, LPARAM l_param); |
| 402 LRESULT OnNCUAHDrawFrame(UINT message, WPARAM w_param, LPARAM l_param); | 406 LRESULT OnNCUAHDrawFrame(UINT message, WPARAM w_param, LPARAM l_param); |
| 403 LRESULT OnNotify(int w_param, NMHDR* l_param); | 407 LRESULT OnNotify(int w_param, NMHDR* l_param); |
| 404 void OnPaint(HDC dc); | 408 void OnPaint(HDC dc); |
| 405 LRESULT OnReflectedMessage(UINT message, WPARAM w_param, LPARAM l_param); | 409 LRESULT OnReflectedMessage(UINT message, WPARAM w_param, LPARAM l_param); |
| 410 LRESULT OnScrollMessage(UINT message, WPARAM w_param, LPARAM l_param); |
| 406 LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param); | 411 LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param); |
| 407 void OnSetFocus(HWND last_focused_window); | 412 void OnSetFocus(HWND last_focused_window); |
| 408 LRESULT OnSetIcon(UINT size_type, HICON new_icon); | 413 LRESULT OnSetIcon(UINT size_type, HICON new_icon); |
| 409 LRESULT OnSetText(const wchar_t* text); | 414 LRESULT OnSetText(const wchar_t* text); |
| 410 void OnSettingChange(UINT flags, const wchar_t* section); | 415 void OnSettingChange(UINT flags, const wchar_t* section); |
| 411 void OnSize(UINT param, const CSize& size); | 416 void OnSize(UINT param, const CSize& size); |
| 412 void OnSysCommand(UINT notification_code, const CPoint& point); | 417 void OnSysCommand(UINT notification_code, const CPoint& point); |
| 413 void OnThemeChanged(); | 418 void OnThemeChanged(); |
| 414 LRESULT OnTouchEvent(UINT message, WPARAM w_param, LPARAM l_param); | 419 LRESULT OnTouchEvent(UINT message, WPARAM w_param, LPARAM l_param); |
| 415 void OnWindowPosChanging(WINDOWPOS* window_pos); | 420 void OnWindowPosChanging(WINDOWPOS* window_pos); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 | 520 |
| 516 // True the first time nccalc is called on a sizable widget | 521 // True the first time nccalc is called on a sizable widget |
| 517 bool is_first_nccalc_; | 522 bool is_first_nccalc_; |
| 518 | 523 |
| 519 // A factory used to lookup appbar autohide edges. | 524 // A factory used to lookup appbar autohide edges. |
| 520 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; | 525 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; |
| 521 | 526 |
| 522 // Generates touch-ids for touch-events. | 527 // Generates touch-ids for touch-events. |
| 523 ui::SequentialIDGenerator id_generator_; | 528 ui::SequentialIDGenerator id_generator_; |
| 524 | 529 |
| 530 // Indicates if the window has the WS_VSCROLL and WS_HSCROLL styles set. |
| 531 bool scroll_styles_set_; |
| 532 |
| 525 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 533 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
| 526 }; | 534 }; |
| 527 | 535 |
| 528 // This window property if set on the window does not activate the window for a | 536 // This window property if set on the window does not activate the window for a |
| 529 // touch based WM_MOUSEACTIVATE message. | 537 // touch based WM_MOUSEACTIVATE message. |
| 530 const wchar_t kIgnoreTouchMouseActivateForWindow[] = | 538 const wchar_t kIgnoreTouchMouseActivateForWindow[] = |
| 531 L"Chrome.IgnoreMouseActivate"; | 539 L"Chrome.IgnoreMouseActivate"; |
| 532 | 540 |
| 533 } // namespace views | 541 } // namespace views |
| 534 | 542 |
| 535 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 543 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| OLD | NEW |