Chromium Code Reviews| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 | 204 |
| 205 // Updates the window style to reflect whether it can be resized or maximized. | 205 // Updates the window style to reflect whether it can be resized or maximized. |
| 206 void SizeConstraintsChanged(); | 206 void SizeConstraintsChanged(); |
| 207 | 207 |
| 208 // Returns true if content is rendered to a child window instead of directly | 208 // Returns true if content is rendered to a child window instead of directly |
| 209 // to this window. | 209 // to this window. |
| 210 bool HasChildRenderingWindow(); | 210 bool HasChildRenderingWindow(); |
| 211 | 211 |
| 212 private: | 212 private: |
| 213 typedef std::set<DWORD> TouchIDs; | 213 typedef std::set<DWORD> TouchIDs; |
| 214 enum class DwmFrameState {OFF, ON}; | |
| 214 | 215 |
| 215 // Overridden from WindowImpl: | 216 // Overridden from WindowImpl: |
| 216 HICON GetDefaultWindowIcon() const override; | 217 HICON GetDefaultWindowIcon() const override; |
| 217 HICON GetSmallWindowIcon() const override; | 218 HICON GetSmallWindowIcon() const override; |
| 218 LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) override; | 219 LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) override; |
| 219 | 220 |
| 220 // Overridden from WindowEventTarget | 221 // Overridden from WindowEventTarget |
| 221 LRESULT HandleMouseMessage(unsigned int message, | 222 LRESULT HandleMouseMessage(unsigned int message, |
| 222 WPARAM w_param, | 223 WPARAM w_param, |
| 223 LPARAM l_param, | 224 LPARAM l_param, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 | 308 |
| 308 // Stops ignoring SetWindowPos() requests (see below). | 309 // Stops ignoring SetWindowPos() requests (see below). |
| 309 void StopIgnoringPosChanges() { ignore_window_pos_changes_ = false; } | 310 void StopIgnoringPosChanges() { ignore_window_pos_changes_ = false; } |
| 310 | 311 |
| 311 // Attempts to force the window to be redrawn, ensuring that it gets | 312 // Attempts to force the window to be redrawn, ensuring that it gets |
| 312 // onscreen. | 313 // onscreen. |
| 313 void ForceRedrawWindow(int attempts); | 314 void ForceRedrawWindow(int attempts); |
| 314 | 315 |
| 315 bool HasSystemFrame() const; | 316 bool HasSystemFrame() const; |
| 316 | 317 |
| 318 // Adds or removes the frame extension into client area with | |
| 319 // DwmExtendFrameIntoClientArea | |
|
scottmg
2016/06/29 22:35:37
nit; . at end of sentence.
| |
| 320 void SetDwmFrameExtension(DwmFrameState state); | |
| 321 | |
| 317 // Message Handlers ---------------------------------------------------------- | 322 // Message Handlers ---------------------------------------------------------- |
| 318 | 323 |
| 319 BEGIN_SAFE_MSG_MAP_EX(weak_factory_) | 324 BEGIN_SAFE_MSG_MAP_EX(weak_factory_) |
| 320 // Range handlers must go first! | 325 // Range handlers must go first! |
| 321 CR_MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) | 326 CR_MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) |
| 322 CR_MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, | 327 CR_MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, |
| 323 WM_NCXBUTTONDBLCLK, | 328 WM_NCXBUTTONDBLCLK, |
| 324 OnMouseRange) | 329 OnMouseRange) |
| 325 | 330 |
| 326 // CustomFrameWindow hacks | 331 // CustomFrameWindow hacks |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 675 | 680 |
| 676 // The factory used with BEGIN_SAFE_MSG_MAP_EX. | 681 // The factory used with BEGIN_SAFE_MSG_MAP_EX. |
| 677 base::WeakPtrFactory<HWNDMessageHandler> weak_factory_; | 682 base::WeakPtrFactory<HWNDMessageHandler> weak_factory_; |
| 678 | 683 |
| 679 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); | 684 DISALLOW_COPY_AND_ASSIGN(HWNDMessageHandler); |
| 680 }; | 685 }; |
| 681 | 686 |
| 682 } // namespace views | 687 } // namespace views |
| 683 | 688 |
| 684 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ | 689 #endif // UI_VIEWS_WIN_HWND_MESSAGE_HANDLER_H_ |
| OLD | NEW |