| 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 #include "ui/views/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 } | 679 } |
| 680 | 680 |
| 681 bool HWNDMessageHandler::IsMinimized() const { | 681 bool HWNDMessageHandler::IsMinimized() const { |
| 682 return !!::IsIconic(hwnd()); | 682 return !!::IsIconic(hwnd()); |
| 683 } | 683 } |
| 684 | 684 |
| 685 bool HWNDMessageHandler::IsMaximized() const { | 685 bool HWNDMessageHandler::IsMaximized() const { |
| 686 return !!::IsZoomed(hwnd()); | 686 return !!::IsZoomed(hwnd()); |
| 687 } | 687 } |
| 688 | 688 |
| 689 bool HWNDMessageHandler::IsAlwaysOnTop() const { |
| 690 return (GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_TOPMOST) > 0; |
| 691 } |
| 692 |
| 689 bool HWNDMessageHandler::RunMoveLoop(const gfx::Vector2d& drag_offset, | 693 bool HWNDMessageHandler::RunMoveLoop(const gfx::Vector2d& drag_offset, |
| 690 bool hide_on_escape) { | 694 bool hide_on_escape) { |
| 691 ReleaseCapture(); | 695 ReleaseCapture(); |
| 692 MoveLoopMouseWatcher watcher(this, hide_on_escape); | 696 MoveLoopMouseWatcher watcher(this, hide_on_escape); |
| 693 #if defined(USE_AURA) | 697 #if defined(USE_AURA) |
| 694 // In Aura, we handle touch events asynchronously. So we need to allow nested | 698 // In Aura, we handle touch events asynchronously. So we need to allow nested |
| 695 // tasks while in windows move loop. | 699 // tasks while in windows move loop. |
| 696 base::MessageLoop::ScopedNestableTaskAllower allow_nested( | 700 base::MessageLoop::ScopedNestableTaskAllower allow_nested( |
| 697 base::MessageLoop::current()); | 701 base::MessageLoop::current()); |
| 698 #endif | 702 #endif |
| (...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2237 delegate_->HandleVisibilityChanged(false); | 2241 delegate_->HandleVisibilityChanged(false); |
| 2238 SetMsgHandled(FALSE); | 2242 SetMsgHandled(FALSE); |
| 2239 } | 2243 } |
| 2240 | 2244 |
| 2241 void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) { | 2245 void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) { |
| 2242 for (size_t i = 0; i < touch_events.size(); ++i) | 2246 for (size_t i = 0; i < touch_events.size(); ++i) |
| 2243 delegate_->HandleTouchEvent(touch_events[i]); | 2247 delegate_->HandleTouchEvent(touch_events[i]); |
| 2244 } | 2248 } |
| 2245 | 2249 |
| 2246 } // namespace views | 2250 } // namespace views |
| OLD | NEW |