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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 active_window_observer_.reset(); 669 active_window_observer_.reset();
670 else 670 else
671 active_window_observer_.reset(new ActiveWindowObserver(this)); 671 active_window_observer_.reset(new ActiveWindowObserver(this));
672 } 672 }
673 673
674 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop( 674 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop(
675 const gfx::Point& drag_offset) { 675 const gfx::Point& drag_offset) {
676 if (window_->parent() && 676 if (window_->parent() &&
677 aura::client::GetWindowMoveClient(window_->parent())) { 677 aura::client::GetWindowMoveClient(window_->parent())) {
678 SetCapture(); 678 SetCapture();
679 aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop( 679 if (aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop(
680 window_, drag_offset); 680 window_, drag_offset) == aura::client::MOVE_SUCCESSFUL) {
681 return Widget::MOVE_LOOP_SUCCESSFUL; 681 return Widget::MOVE_LOOP_SUCCESSFUL;
682 }
682 } 683 }
683 return Widget::MOVE_LOOP_CANCELED; 684 return Widget::MOVE_LOOP_CANCELED;
684 } 685 }
685 686
686 void NativeWidgetAura::EndMoveLoop() { 687 void NativeWidgetAura::EndMoveLoop() {
687 if (window_->parent() && 688 if (window_->parent() &&
688 aura::client::GetWindowMoveClient(window_->parent())) { 689 aura::client::GetWindowMoveClient(window_->parent())) {
689 aura::client::GetWindowMoveClient(window_->parent())->EndMoveLoop(); 690 aura::client::GetWindowMoveClient(window_->parent())->EndMoveLoop();
690 } 691 }
691 } 692 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 return aura::Env::GetInstance()->is_mouse_button_down(); 1059 return aura::Env::GetInstance()->is_mouse_button_down();
1059 } 1060 }
1060 1061
1061 // static 1062 // static
1062 bool NativeWidgetPrivate::IsTouchDown() { 1063 bool NativeWidgetPrivate::IsTouchDown() {
1063 return aura::Env::GetInstance()->is_touch_down(); 1064 return aura::Env::GetInstance()->is_touch_down();
1064 } 1065 }
1065 1066
1066 } // namespace internal 1067 } // namespace internal
1067 } // namespace views 1068 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_root_window_host_win.cc ('k') | ui/views/widget/x11_desktop_window_move_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698