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

Side by Side Diff: ash/test/shelf_view_test_api.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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
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 "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"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 void ShelfViewTestAPI::SetAnimationDuration(int duration_ms) { 82 void ShelfViewTestAPI::SetAnimationDuration(int duration_ms) {
83 shelf_view_->bounds_animator_->SetAnimationDuration(duration_ms); 83 shelf_view_->bounds_animator_->SetAnimationDuration(duration_ms);
84 } 84 }
85 85
86 void ShelfViewTestAPI::RunMessageLoopUntilAnimationsDone() { 86 void ShelfViewTestAPI::RunMessageLoopUntilAnimationsDone() {
87 if (!shelf_view_->bounds_animator_->IsAnimating()) 87 if (!shelf_view_->bounds_animator_->IsAnimating())
88 return; 88 return;
89 89
90 scoped_ptr<TestAPIAnimationObserver> observer(new TestAPIAnimationObserver()); 90 std::unique_ptr<TestAPIAnimationObserver> observer(
91 new TestAPIAnimationObserver());
91 shelf_view_->bounds_animator_->AddObserver(observer.get()); 92 shelf_view_->bounds_animator_->AddObserver(observer.get());
92 93
93 // This nested loop will quit when TestAPIAnimationObserver's 94 // This nested loop will quit when TestAPIAnimationObserver's
94 // OnBoundsAnimatorDone is called. 95 // OnBoundsAnimatorDone is called.
95 base::MessageLoop::current()->Run(); 96 base::MessageLoop::current()->Run();
96 97
97 shelf_view_->bounds_animator_->RemoveObserver(observer.get()); 98 shelf_view_->bounds_animator_->RemoveObserver(observer.get());
98 } 99 }
99 100
100 OverflowBubble* ShelfViewTestAPI::overflow_bubble() { 101 OverflowBubble* ShelfViewTestAPI::overflow_bubble() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return shelf_view_->dragged_off_from_overflow_to_shelf_; 144 return shelf_view_->dragged_off_from_overflow_to_shelf_;
144 } 145 }
145 146
146 ShelfButtonPressedMetricTracker* 147 ShelfButtonPressedMetricTracker*
147 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() { 148 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() {
148 return &(shelf_view_->shelf_button_pressed_metric_tracker_); 149 return &(shelf_view_->shelf_button_pressed_metric_tracker_);
149 } 150 }
150 151
151 } // namespace test 152 } // namespace test
152 } // namespace ash 153 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/shelf_button_pressed_metric_tracker_test_api.cc ('k') | ash/test/task_switch_time_tracker_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698