Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 26427002: Add always-on-top property to app windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed potentially flaky test Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
sky 2013/10/10 02:45:57 == WS_EX_TOPMOST?
tmdiep 2013/10/10 04:02:01 Changed to != 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
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
OLDNEW
« ui/views/widget/widget.h ('K') | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698