OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |