| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. | 335 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. |
| 336 MSG_WM_ACTIVATEAPP(OnActivateApp) | 336 MSG_WM_ACTIVATEAPP(OnActivateApp) |
| 337 MSG_WM_APPCOMMAND(OnAppCommand) | 337 MSG_WM_APPCOMMAND(OnAppCommand) |
| 338 MSG_WM_CANCELMODE(OnCancelMode) | 338 MSG_WM_CANCELMODE(OnCancelMode) |
| 339 MSG_WM_CAPTURECHANGED(OnCaptureChanged) | 339 MSG_WM_CAPTURECHANGED(OnCaptureChanged) |
| 340 MSG_WM_CLOSE(OnClose) | 340 MSG_WM_CLOSE(OnClose) |
| 341 MSG_WM_COMMAND(OnCommand) | 341 MSG_WM_COMMAND(OnCommand) |
| 342 MSG_WM_CREATE(OnCreate) | 342 MSG_WM_CREATE(OnCreate) |
| 343 MSG_WM_DESTROY(OnDestroy) | 343 MSG_WM_DESTROY(OnDestroy) |
| 344 MSG_WM_DISPLAYCHANGE(OnDisplayChange) | 344 MSG_WM_DISPLAYCHANGE(OnDisplayChange) |
| 345 MSG_WM_ENTERMENULOOP(OnEnterMenuLoop) |
| 346 MSG_WM_EXITMENULOOP(OnExitMenuLoop) |
| 345 MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) | 347 MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) |
| 346 MSG_WM_ERASEBKGND(OnEraseBkgnd) | 348 MSG_WM_ERASEBKGND(OnEraseBkgnd) |
| 347 MSG_WM_EXITSIZEMOVE(OnExitSizeMove) | 349 MSG_WM_EXITSIZEMOVE(OnExitSizeMove) |
| 348 MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) | 350 MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) |
| 349 MSG_WM_INITMENU(OnInitMenu) | 351 MSG_WM_INITMENU(OnInitMenu) |
| 350 MSG_WM_INPUTLANGCHANGE(OnInputLangChange) | 352 MSG_WM_INPUTLANGCHANGE(OnInputLangChange) |
| 351 MSG_WM_KILLFOCUS(OnKillFocus) | 353 MSG_WM_KILLFOCUS(OnKillFocus) |
| 352 MSG_WM_MOVE(OnMove) | 354 MSG_WM_MOVE(OnMove) |
| 353 MSG_WM_MOVING(OnMoving) | 355 MSG_WM_MOVING(OnMoving) |
| 354 MSG_WM_NCCALCSIZE(OnNCCalcSize) | 356 MSG_WM_NCCALCSIZE(OnNCCalcSize) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 376 // WindowImpl. | 378 // WindowImpl. |
| 377 BOOL OnAppCommand(HWND window, short command, WORD device, int keystate); | 379 BOOL OnAppCommand(HWND window, short command, WORD device, int keystate); |
| 378 void OnCancelMode(); | 380 void OnCancelMode(); |
| 379 void OnCaptureChanged(HWND window); | 381 void OnCaptureChanged(HWND window); |
| 380 void OnClose(); | 382 void OnClose(); |
| 381 void OnCommand(UINT notification_code, int command, HWND window); | 383 void OnCommand(UINT notification_code, int command, HWND window); |
| 382 LRESULT OnCreate(CREATESTRUCT* create_struct); | 384 LRESULT OnCreate(CREATESTRUCT* create_struct); |
| 383 void OnDestroy(); | 385 void OnDestroy(); |
| 384 void OnDisplayChange(UINT bits_per_pixel, const CSize& screen_size); | 386 void OnDisplayChange(UINT bits_per_pixel, const CSize& screen_size); |
| 385 LRESULT OnDwmCompositionChanged(UINT msg, WPARAM w_param, LPARAM l_param); | 387 LRESULT OnDwmCompositionChanged(UINT msg, WPARAM w_param, LPARAM l_param); |
| 388 void OnEnterMenuLoop(BOOL from_track_popup_menu); |
| 386 void OnEnterSizeMove(); | 389 void OnEnterSizeMove(); |
| 387 LRESULT OnEraseBkgnd(HDC dc); | 390 LRESULT OnEraseBkgnd(HDC dc); |
| 391 void OnExitMenuLoop(BOOL is_shortcut_menu); |
| 388 void OnExitSizeMove(); | 392 void OnExitSizeMove(); |
| 389 void OnGetMinMaxInfo(MINMAXINFO* minmax_info); | 393 void OnGetMinMaxInfo(MINMAXINFO* minmax_info); |
| 390 LRESULT OnGetObject(UINT message, WPARAM w_param, LPARAM l_param); | 394 LRESULT OnGetObject(UINT message, WPARAM w_param, LPARAM l_param); |
| 391 LRESULT OnImeMessages(UINT message, WPARAM w_param, LPARAM l_param); | 395 LRESULT OnImeMessages(UINT message, WPARAM w_param, LPARAM l_param); |
| 392 void OnInitMenu(HMENU menu); | 396 void OnInitMenu(HMENU menu); |
| 393 void OnInputLangChange(DWORD character_set, HKL input_language_id); | 397 void OnInputLangChange(DWORD character_set, HKL input_language_id); |
| 394 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); | 398 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); |
| 395 void OnKillFocus(HWND focused_window); | 399 void OnKillFocus(HWND focused_window); |
| 396 LRESULT OnMouseActivate(UINT message, WPARAM w_param, LPARAM l_param); | 400 LRESULT OnMouseActivate(UINT message, WPARAM w_param, LPARAM l_param); |
| 397 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); | 401 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 518 |
| 515 // Set to true when waiting for RedrawLayeredWindowContents(). | 519 // Set to true when waiting for RedrawLayeredWindowContents(). |
| 516 bool waiting_for_redraw_layered_window_contents_; | 520 bool waiting_for_redraw_layered_window_contents_; |
| 517 | 521 |
| 518 // True the first time nccalc is called on a sizable widget | 522 // True the first time nccalc is called on a sizable widget |
| 519 bool is_first_nccalc_; | 523 bool is_first_nccalc_; |
| 520 | 524 |
| 521 // Copy of custom window region specified via SetRegion(), if any. | 525 // Copy of custom window region specified via SetRegion(), if any. |
| 522 base::win::ScopedRegion custom_window_region_; | 526 base::win::ScopedRegion custom_window_region_; |
| 523 | 527 |
| 528 // If > 0 indicates a menu is running (we're showing a native menu). |
| 529 int menu_depth_; |
| 530 |
| 524 // A factory used to lookup appbar autohide edges. | 531 // A factory used to lookup appbar autohide edges. |
| 525 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; | 532 base::WeakPtrFactory<HWNDMessageHandler> autohide_factory_; |
| 526 | 533 |
| 527 // Generates touch-ids for touch-events. | 534 // Generates touch-ids for touch-events. |
| 528 ui::SequentialIDGenerator id_generator_; | 535 ui::SequentialIDGenerator id_generator_; |
| 529 | 536 |
| 530 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 537 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
| 531 }; | 538 }; |
| 532 | 539 |
| 533 // This window property if set on the window does not activate the window for a | 540 // This window property if set on the window does not activate the window for a |
| 534 // touch based WM_MOUSEACTIVATE message. | 541 // touch based WM_MOUSEACTIVATE message. |
| 535 const wchar_t kIgnoreTouchMouseActivateForWindow[] = | 542 const wchar_t kIgnoreTouchMouseActivateForWindow[] = |
| 536 L"Chrome.IgnoreMouseActivate"; | 543 L"Chrome.IgnoreMouseActivate"; |
| 537 | 544 |
| 538 } // namespace views | 545 } // namespace views |
| 539 | 546 |
| 540 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 547 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| OLD | NEW |