| 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 "ash/test/shelf_view_test_api.h" | 5 #include "ash/test/shelf_view_test_api.h" |
| 6 | 6 |
| 7 #include "ash/shelf/overflow_button.h" | 7 #include "ash/shelf/overflow_button.h" |
| 8 #include "ash/shelf/shelf_button.h" | 8 #include "ash/shelf/shelf_button.h" |
| 9 #include "ash/shelf/shelf_constants.h" | 9 #include "ash/shelf/shelf_constants.h" |
| 10 #include "ash/shelf/shelf_model.h" | 10 #include "ash/shelf/shelf_model.h" |
| 11 #include "ash/shelf/shelf_view.h" | 11 #include "ash/shelf/shelf_view.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "ui/views/animation/bounds_animator.h" | 13 #include "ui/views/animation/bounds_animator.h" |
| 14 #include "ui/views/view_model.h" | 14 #include "ui/views/view_model.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // A class used to wait for animations. | 18 // A class used to wait for animations. |
| 19 class TestAPIAnimationObserver : public views::BoundsAnimatorObserver { | 19 class TestAPIAnimationObserver : public views::BoundsAnimatorObserver { |
| 20 public: | 20 public: |
| 21 TestAPIAnimationObserver() {} | 21 TestAPIAnimationObserver() {} |
| 22 virtual ~TestAPIAnimationObserver() {} | 22 ~TestAPIAnimationObserver() override {} |
| 23 | 23 |
| 24 // views::BoundsAnimatorObserver overrides: | 24 // views::BoundsAnimatorObserver overrides: |
| 25 virtual void OnBoundsAnimatorProgressed( | 25 void OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) override {} |
| 26 views::BoundsAnimator* animator) override {} | 26 void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override { |
| 27 virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override { | |
| 28 base::MessageLoop::current()->Quit(); | 27 base::MessageLoop::current()->Quit(); |
| 29 } | 28 } |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(TestAPIAnimationObserver); | 31 DISALLOW_COPY_AND_ASSIGN(TestAPIAnimationObserver); |
| 33 }; | 32 }; |
| 34 | 33 |
| 35 } // namespace | 34 } // namespace |
| 36 | 35 |
| 37 namespace ash { | 36 namespace ash { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 bool ShelfViewTestAPI::IsRippedOffFromShelf() { | 134 bool ShelfViewTestAPI::IsRippedOffFromShelf() { |
| 136 return shelf_view_->dragged_off_shelf_; | 135 return shelf_view_->dragged_off_shelf_; |
| 137 } | 136 } |
| 138 | 137 |
| 139 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { | 138 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { |
| 140 return shelf_view_->dragged_off_from_overflow_to_shelf_; | 139 return shelf_view_->dragged_off_from_overflow_to_shelf_; |
| 141 } | 140 } |
| 142 | 141 |
| 143 } // namespace test | 142 } // namespace test |
| 144 } // namespace ash | 143 } // namespace ash |
| OLD | NEW |