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

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: win fix, adjust test screen size 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 active_window_observer_.reset(); 668 active_window_observer_.reset();
669 else 669 else
670 active_window_observer_.reset(new ActiveWindowObserver(this)); 670 active_window_observer_.reset(new ActiveWindowObserver(this));
671 } 671 }
672 672
673 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop( 673 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop(
674 const gfx::Point& drag_offset) { 674 const gfx::Point& drag_offset) {
675 if (window_->parent() && 675 if (window_->parent() &&
676 aura::client::GetWindowMoveClient(window_->parent())) { 676 aura::client::GetWindowMoveClient(window_->parent())) {
677 SetCapture(); 677 SetCapture();
678 aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop( 678 if (aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop(
679 window_, drag_offset); 679 window_, drag_offset) == aura::client::MOVE_SUCCESSFUL) {
680 return Widget::MOVE_LOOP_SUCCESSFUL; 680 return Widget::MOVE_LOOP_SUCCESSFUL;
681 }
681 } 682 }
682 return Widget::MOVE_LOOP_CANCELED; 683 return Widget::MOVE_LOOP_CANCELED;
683 } 684 }
684 685
685 void NativeWidgetAura::EndMoveLoop() { 686 void NativeWidgetAura::EndMoveLoop() {
686 if (window_->parent() && 687 if (window_->parent() &&
687 aura::client::GetWindowMoveClient(window_->parent())) { 688 aura::client::GetWindowMoveClient(window_->parent())) {
688 aura::client::GetWindowMoveClient(window_->parent())->EndMoveLoop(); 689 aura::client::GetWindowMoveClient(window_->parent())->EndMoveLoop();
689 } 690 }
690 } 691 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 return aura::Env::GetInstance()->is_mouse_button_down(); 1058 return aura::Env::GetInstance()->is_mouse_button_down();
1058 } 1059 }
1059 1060
1060 // static 1061 // static
1061 bool NativeWidgetPrivate::IsTouchDown() { 1062 bool NativeWidgetPrivate::IsTouchDown() {
1062 return aura::Env::GetInstance()->is_touch_down(); 1063 return aura::Env::GetInstance()->is_touch_down();
1063 } 1064 }
1064 1065
1065 } // namespace internal 1066 } // namespace internal
1066 } // namespace views 1067 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698