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

Side by Side Diff: ash/test/display_manager_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
« no previous file with comments | « ash/test/display_manager_test_api.h ('k') | ash/test/mirror_window_test_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/display_manager_test_api.h" 5 #include "ash/test/display_manager_test_api.h"
6 6
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return display_manager->SetDisplayMode(display_id, mode); 164 return display_manager->SetDisplayMode(display_id, mode);
165 } 165 }
166 166
167 void SwapPrimaryDisplay() { 167 void SwapPrimaryDisplay() {
168 if (gfx::Screen::GetScreen()->GetNumDisplays() <= 1) 168 if (gfx::Screen::GetScreen()->GetNumDisplays() <= 1)
169 return; 169 return;
170 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId( 170 Shell::GetInstance()->window_tree_host_manager()->SetPrimaryDisplayId(
171 ScreenUtil::GetSecondaryDisplay().id()); 171 ScreenUtil::GetSecondaryDisplay().id());
172 } 172 }
173 173
174 scoped_ptr<display::DisplayLayout> CreateDisplayLayout( 174 std::unique_ptr<display::DisplayLayout> CreateDisplayLayout(
175 display::DisplayPlacement::Position position, 175 display::DisplayPlacement::Position position,
176 int offset) { 176 int offset) {
177 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 177 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
178 display::DisplayIdList list = display_manager->GetCurrentDisplayIdList(); 178 display::DisplayIdList list = display_manager->GetCurrentDisplayIdList();
179 179
180 display::DisplayLayoutBuilder builder( 180 display::DisplayLayoutBuilder builder(
181 gfx::Screen::GetScreen()->GetPrimaryDisplay().id()); 181 gfx::Screen::GetScreen()->GetPrimaryDisplay().id());
182 builder.SetSecondaryPlacement(ScreenUtil::GetSecondaryDisplay().id(), 182 builder.SetSecondaryPlacement(ScreenUtil::GetSecondaryDisplay().id(),
183 position, offset); 183 position, offset);
184 return builder.Build(); 184 return builder.Build();
(...skipping 14 matching lines...) Expand all
199 for (size_t i = 0; i < count; i++) { 199 for (size_t i = 0; i < count; i++) {
200 int64_t id = va_arg(args, int64_t); 200 int64_t id = va_arg(args, int64_t);
201 list.push_back(id); 201 list.push_back(id);
202 } 202 }
203 SortDisplayIdList(&list); 203 SortDisplayIdList(&list);
204 return list; 204 return list;
205 } 205 }
206 206
207 } // namespace test 207 } // namespace test
208 } // namespace ash 208 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/display_manager_test_api.h ('k') | ash/test/mirror_window_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698