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

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

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove SizeOfVector Created 8 years, 1 month 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 void NativeWidgetAura::SetInactiveRenderingDisabled(bool value) { 601 void NativeWidgetAura::SetInactiveRenderingDisabled(bool value) {
602 if (!value) { 602 if (!value) {
603 active_window_observer_.reset(); 603 active_window_observer_.reset();
604 } else { 604 } else {
605 active_window_observer_.reset( 605 active_window_observer_.reset(
606 new NativeWidgetAuraWindowObserver(window_, delegate_)); 606 new NativeWidgetAuraWindowObserver(window_, delegate_));
607 } 607 }
608 } 608 }
609 609
610 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop( 610 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop(
611 const gfx::Point& drag_offset) { 611 const gfx::Vector2d& drag_offset) {
612 if (window_->parent() && 612 if (window_->parent() &&
613 aura::client::GetWindowMoveClient(window_->parent())) { 613 aura::client::GetWindowMoveClient(window_->parent())) {
614 SetCapture(); 614 SetCapture();
615 if (aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop( 615 if (aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop(
616 window_, drag_offset) == aura::client::MOVE_SUCCESSFUL) { 616 window_, drag_offset) == aura::client::MOVE_SUCCESSFUL) {
617 return Widget::MOVE_LOOP_SUCCESSFUL; 617 return Widget::MOVE_LOOP_SUCCESSFUL;
618 } 618 }
619 } 619 }
620 return Widget::MOVE_LOOP_CANCELED; 620 return Widget::MOVE_LOOP_CANCELED;
621 } 621 }
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 return aura::Env::GetInstance()->is_mouse_button_down(); 1006 return aura::Env::GetInstance()->is_mouse_button_down();
1007 } 1007 }
1008 1008
1009 // static 1009 // static
1010 bool NativeWidgetPrivate::IsTouchDown() { 1010 bool NativeWidgetPrivate::IsTouchDown() {
1011 return aura::Env::GetInstance()->is_touch_down(); 1011 return aura::Env::GetInstance()->is_touch_down();
1012 } 1012 }
1013 1013
1014 } // namespace internal 1014 } // namespace internal
1015 } // namespace views 1015 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698