| 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 <set> | 10 #include <set> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 const gfx::ImageSkia& app_icon); | 196 const gfx::ImageSkia& app_icon); |
| 197 | 197 |
| 198 void set_remove_standard_frame(bool remove_standard_frame) { | 198 void set_remove_standard_frame(bool remove_standard_frame) { |
| 199 remove_standard_frame_ = remove_standard_frame; | 199 remove_standard_frame_ = remove_standard_frame; |
| 200 } | 200 } |
| 201 | 201 |
| 202 void set_use_system_default_icon(bool use_system_default_icon) { | 202 void set_use_system_default_icon(bool use_system_default_icon) { |
| 203 use_system_default_icon_ = use_system_default_icon; | 203 use_system_default_icon_ = use_system_default_icon; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void SetFullscreen(bool fullscreen); |
| 207 |
| 206 private: | 208 private: |
| 207 typedef std::set<DWORD> TouchIDs; | 209 typedef std::set<DWORD> TouchIDs; |
| 208 | 210 |
| 209 // Overridden from internal::InputMethodDelegate: | 211 // Overridden from internal::InputMethodDelegate: |
| 210 virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE; | 212 virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE; |
| 211 | 213 |
| 212 // Overridden from WindowImpl: | 214 // Overridden from WindowImpl: |
| 213 virtual HICON GetDefaultWindowIcon() const OVERRIDE; | 215 virtual HICON GetDefaultWindowIcon() const OVERRIDE; |
| 214 virtual LRESULT OnWndProc(UINT message, | 216 virtual LRESULT OnWndProc(UINT message, |
| 215 WPARAM w_param, | 217 WPARAM w_param, |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 478 |
| 477 // Returns true if the mouse message passed in is an OS synthesized mouse | 479 // Returns true if the mouse message passed in is an OS synthesized mouse |
| 478 // message. | 480 // message. |
| 479 // |message| identifies the mouse message. | 481 // |message| identifies the mouse message. |
| 480 // |message_time| is the time when the message occurred. | 482 // |message_time| is the time when the message occurred. |
| 481 // |l_param| indicates the location of the mouse message. | 483 // |l_param| indicates the location of the mouse message. |
| 482 bool IsSynthesizedMouseMessage(unsigned int message, | 484 bool IsSynthesizedMouseMessage(unsigned int message, |
| 483 int message_time, | 485 int message_time, |
| 484 LPARAM l_param); | 486 LPARAM l_param); |
| 485 | 487 |
| 488 // Provides functionality to transition a frame to and from DWM. |
| 489 void PerformDwmTransition(); |
| 490 |
| 486 HWNDMessageHandlerDelegate* delegate_; | 491 HWNDMessageHandlerDelegate* delegate_; |
| 487 | 492 |
| 488 scoped_ptr<FullscreenHandler> fullscreen_handler_; | 493 scoped_ptr<FullscreenHandler> fullscreen_handler_; |
| 489 | 494 |
| 490 // Set to true in Close() and false is CloseNow(). | 495 // Set to true in Close() and false is CloseNow(). |
| 491 bool waiting_for_close_now_; | 496 bool waiting_for_close_now_; |
| 492 | 497 |
| 493 bool remove_standard_frame_; | 498 bool remove_standard_frame_; |
| 494 | 499 |
| 495 bool use_system_default_icon_; | 500 bool use_system_default_icon_; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 // Time the last touch message was received. Used to flag mouse messages | 610 // Time the last touch message was received. Used to flag mouse messages |
| 606 // synthesized by Windows for touch which are not flagged by the OS as | 611 // synthesized by Windows for touch which are not flagged by the OS as |
| 607 // synthesized mouse messages. For more information please refer to | 612 // synthesized mouse messages. For more information please refer to |
| 608 // the IsMouseEventFromTouch function. | 613 // the IsMouseEventFromTouch function. |
| 609 static long last_touch_message_time_; | 614 static long last_touch_message_time_; |
| 610 | 615 |
| 611 // Time the last WM_MOUSEHWHEEL message is received. Please refer to the | 616 // Time the last WM_MOUSEHWHEEL message is received. Please refer to the |
| 612 // HandleMouseEventInternal function as to why this is needed. | 617 // HandleMouseEventInternal function as to why this is needed. |
| 613 long last_mouse_hwheel_time_; | 618 long last_mouse_hwheel_time_; |
| 614 | 619 |
| 620 // Set to true if DWM transition is desired for this window. Defaults to |
| 621 // false. |
| 622 bool dwm_transition_desired_; |
| 623 |
| 615 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 624 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
| 616 }; | 625 }; |
| 617 | 626 |
| 618 } // namespace views | 627 } // namespace views |
| 619 | 628 |
| 620 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 629 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| OLD | NEW |