| 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 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 CR_MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) | 404 CR_MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) |
| 405 CR_MSG_WM_ERASEBKGND(OnEraseBkgnd) | 405 CR_MSG_WM_ERASEBKGND(OnEraseBkgnd) |
| 406 CR_MSG_WM_EXITSIZEMOVE(OnExitSizeMove) | 406 CR_MSG_WM_EXITSIZEMOVE(OnExitSizeMove) |
| 407 CR_MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) | 407 CR_MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) |
| 408 CR_MSG_WM_INITMENU(OnInitMenu) | 408 CR_MSG_WM_INITMENU(OnInitMenu) |
| 409 CR_MSG_WM_INPUTLANGCHANGE(OnInputLangChange) | 409 CR_MSG_WM_INPUTLANGCHANGE(OnInputLangChange) |
| 410 CR_MSG_WM_KILLFOCUS(OnKillFocus) | 410 CR_MSG_WM_KILLFOCUS(OnKillFocus) |
| 411 CR_MSG_WM_MOVE(OnMove) | 411 CR_MSG_WM_MOVE(OnMove) |
| 412 CR_MSG_WM_MOVING(OnMoving) | 412 CR_MSG_WM_MOVING(OnMoving) |
| 413 CR_MSG_WM_NCCALCSIZE(OnNCCalcSize) | 413 CR_MSG_WM_NCCALCSIZE(OnNCCalcSize) |
| 414 CR_MSG_WM_NCCREATE(OnNCCreate) |
| 414 CR_MSG_WM_NCHITTEST(OnNCHitTest) | 415 CR_MSG_WM_NCHITTEST(OnNCHitTest) |
| 415 CR_MSG_WM_NCPAINT(OnNCPaint) | 416 CR_MSG_WM_NCPAINT(OnNCPaint) |
| 416 CR_MSG_WM_NOTIFY(OnNotify) | 417 CR_MSG_WM_NOTIFY(OnNotify) |
| 417 CR_MSG_WM_PAINT(OnPaint) | 418 CR_MSG_WM_PAINT(OnPaint) |
| 418 CR_MSG_WM_SETFOCUS(OnSetFocus) | 419 CR_MSG_WM_SETFOCUS(OnSetFocus) |
| 419 CR_MSG_WM_SETICON(OnSetIcon) | 420 CR_MSG_WM_SETICON(OnSetIcon) |
| 420 CR_MSG_WM_SETTEXT(OnSetText) | 421 CR_MSG_WM_SETTEXT(OnSetText) |
| 421 CR_MSG_WM_SETTINGCHANGE(OnSettingChange) | 422 CR_MSG_WM_SETTINGCHANGE(OnSettingChange) |
| 422 CR_MSG_WM_SIZE(OnSize) | 423 CR_MSG_WM_SIZE(OnSize) |
| 423 CR_MSG_WM_SYSCOMMAND(OnSysCommand) | 424 CR_MSG_WM_SYSCOMMAND(OnSysCommand) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 void OnInputLangChange(DWORD character_set, HKL input_language_id); | 456 void OnInputLangChange(DWORD character_set, HKL input_language_id); |
| 456 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); | 457 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); |
| 457 void OnKillFocus(HWND focused_window); | 458 void OnKillFocus(HWND focused_window); |
| 458 LRESULT OnMouseActivate(UINT message, WPARAM w_param, LPARAM l_param); | 459 LRESULT OnMouseActivate(UINT message, WPARAM w_param, LPARAM l_param); |
| 459 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); | 460 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); |
| 460 LRESULT OnPointerActivate(UINT message, WPARAM w_param, LPARAM l_param); | 461 LRESULT OnPointerActivate(UINT message, WPARAM w_param, LPARAM l_param); |
| 461 void OnMove(const gfx::Point& point); | 462 void OnMove(const gfx::Point& point); |
| 462 void OnMoving(UINT param, const RECT* new_bounds); | 463 void OnMoving(UINT param, const RECT* new_bounds); |
| 463 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); | 464 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); |
| 464 LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); | 465 LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); |
| 466 LRESULT OnNCCreate(LPCREATESTRUCT lpCreateStruct); |
| 465 LRESULT OnNCHitTest(const gfx::Point& point); | 467 LRESULT OnNCHitTest(const gfx::Point& point); |
| 466 void OnNCPaint(HRGN rgn); | 468 void OnNCPaint(HRGN rgn); |
| 467 LRESULT OnNCUAHDrawCaption(UINT message, WPARAM w_param, LPARAM l_param); | 469 LRESULT OnNCUAHDrawCaption(UINT message, WPARAM w_param, LPARAM l_param); |
| 468 LRESULT OnNCUAHDrawFrame(UINT message, WPARAM w_param, LPARAM l_param); | 470 LRESULT OnNCUAHDrawFrame(UINT message, WPARAM w_param, LPARAM l_param); |
| 469 LRESULT OnNotify(int w_param, NMHDR* l_param); | 471 LRESULT OnNotify(int w_param, NMHDR* l_param); |
| 470 void OnPaint(HDC dc); | 472 void OnPaint(HDC dc); |
| 471 LRESULT OnReflectedMessage(UINT message, WPARAM w_param, LPARAM l_param); | 473 LRESULT OnReflectedMessage(UINT message, WPARAM w_param, LPARAM l_param); |
| 472 LRESULT OnScrollMessage(UINT message, WPARAM w_param, LPARAM l_param); | 474 LRESULT OnScrollMessage(UINT message, WPARAM w_param, LPARAM l_param); |
| 473 LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param); | 475 LRESULT OnSetCursor(UINT message, WPARAM w_param, LPARAM l_param); |
| 474 void OnSetFocus(HWND last_focused_window); | 476 void OnSetFocus(HWND last_focused_window); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 572 |
| 571 // The icon created from the bitmap image of the window icon. | 573 // The icon created from the bitmap image of the window icon. |
| 572 base::win::ScopedHICON window_icon_; | 574 base::win::ScopedHICON window_icon_; |
| 573 | 575 |
| 574 // The icon created from the bitmap image of the app icon. | 576 // The icon created from the bitmap image of the app icon. |
| 575 base::win::ScopedHICON app_icon_; | 577 base::win::ScopedHICON app_icon_; |
| 576 | 578 |
| 577 // The current DPI. | 579 // The current DPI. |
| 578 int dpi_; | 580 int dpi_; |
| 579 | 581 |
| 582 // Whether EnableNonClientDpiScaling was called successfully with this window. |
| 583 // This flag exists because EnableNonClientDpiScaling must be called during |
| 584 // WM_NCCREATE and EnableChildWindowDpiMessage is called after window |
| 585 // creation. We don't want to call both, so this helps us determine if a call |
| 586 // to EnableChildWindowDpiMessage is necessary. |
| 587 bool called_enable_non_client_dpi_scaling_; |
| 588 |
| 580 // Event handling ------------------------------------------------------------ | 589 // Event handling ------------------------------------------------------------ |
| 581 | 590 |
| 582 // The flags currently being used with TrackMouseEvent to track mouse | 591 // The flags currently being used with TrackMouseEvent to track mouse |
| 583 // messages. 0 if there is no active tracking. The value of this member is | 592 // messages. 0 if there is no active tracking. The value of this member is |
| 584 // used when tracking is canceled. | 593 // used when tracking is canceled. |
| 585 DWORD active_mouse_tracking_flags_; | 594 DWORD active_mouse_tracking_flags_; |
| 586 | 595 |
| 587 // Set to true when the user presses the right mouse button on the caption | 596 // Set to true when the user presses the right mouse button on the caption |
| 588 // area. We need this so we can correctly show the context menu on mouse-up. | 597 // area. We need this so we can correctly show the context menu on mouse-up. |
| 589 bool is_right_mouse_pressed_on_caption_; | 598 bool is_right_mouse_pressed_on_caption_; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 709 |
| 701 // The factory used with BEGIN_SAFE_MSG_MAP_EX. | 710 // The factory used with BEGIN_SAFE_MSG_MAP_EX. |
| 702 base::WeakPtrFactory<HWNDMessageHandler> weak_factory_; | 711 base::WeakPtrFactory<HWNDMessageHandler> weak_factory_; |
| 703 | 712 |
| 704 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 713 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
| 705 }; | 714 }; |
| 706 | 715 |
| 707 } // namespace views | 716 } // namespace views |
| 708 | 717 |
| 709 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 718 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| OLD | NEW |