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

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: RenderText fixup 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 void NativeWidgetAura::SetInactiveRenderingDisabled(bool value) { 585 void NativeWidgetAura::SetInactiveRenderingDisabled(bool value) {
586 if (!value) { 586 if (!value) {
587 active_window_observer_.reset(); 587 active_window_observer_.reset();
588 } else { 588 } else {
589 active_window_observer_.reset( 589 active_window_observer_.reset(
590 new NativeWidgetAuraWindowObserver(window_, delegate_)); 590 new NativeWidgetAuraWindowObserver(window_, delegate_));
591 } 591 }
592 } 592 }
593 593
594 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop( 594 Widget::MoveLoopResult NativeWidgetAura::RunMoveLoop(
595 const gfx::Point& drag_offset) { 595 const gfx::Vector2d& drag_offset) {
596 if (window_->parent() && 596 if (window_->parent() &&
597 aura::client::GetWindowMoveClient(window_->parent())) { 597 aura::client::GetWindowMoveClient(window_->parent())) {
598 SetCapture(); 598 SetCapture();
599 if (aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop( 599 if (aura::client::GetWindowMoveClient(window_->parent())->RunMoveLoop(
600 window_, drag_offset) == aura::client::MOVE_SUCCESSFUL) { 600 window_, drag_offset) == aura::client::MOVE_SUCCESSFUL) {
601 return Widget::MOVE_LOOP_SUCCESSFUL; 601 return Widget::MOVE_LOOP_SUCCESSFUL;
602 } 602 }
603 } 603 }
604 return Widget::MOVE_LOOP_CANCELED; 604 return Widget::MOVE_LOOP_CANCELED;
605 } 605 }
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 return aura::Env::GetInstance()->is_mouse_button_down(); 990 return aura::Env::GetInstance()->is_mouse_button_down();
991 } 991 }
992 992
993 // static 993 // static
994 bool NativeWidgetPrivate::IsTouchDown() { 994 bool NativeWidgetPrivate::IsTouchDown() {
995 return aura::Env::GetInstance()->is_touch_down(); 995 return aura::Env::GetInstance()->is_touch_down();
996 } 996 }
997 997
998 } // namespace internal 998 } // namespace internal
999 } // namespace views 999 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698