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

Side by Side Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/extensions/display_info_provider_chromeos.h" 5 #include "chrome/browser/extensions/display_info_provider_chromeos.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "ash/display/display_configuration_controller.h" 9 #include "ash/display/display_configuration_controller.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // display. 161 // display.
162 void UpdateDisplayLayout(const gfx::Rect& primary_display_bounds, 162 void UpdateDisplayLayout(const gfx::Rect& primary_display_bounds,
163 int64_t primary_display_id, 163 int64_t primary_display_id,
164 const gfx::Rect& target_display_bounds, 164 const gfx::Rect& target_display_bounds,
165 int64_t target_display_id) { 165 int64_t target_display_id) {
166 display::DisplayPlacement placement(CreatePlacementForRectangles( 166 display::DisplayPlacement placement(CreatePlacementForRectangles(
167 primary_display_bounds, target_display_bounds)); 167 primary_display_bounds, target_display_bounds));
168 placement.display_id = target_display_id; 168 placement.display_id = target_display_id;
169 placement.parent_display_id = primary_display_id; 169 placement.parent_display_id = primary_display_id;
170 170
171 scoped_ptr<display::DisplayLayout> layout(new display::DisplayLayout); 171 std::unique_ptr<display::DisplayLayout> layout(new display::DisplayLayout);
172 layout->placement_list.push_back(placement); 172 layout->placement_list.push_back(placement);
173 layout->primary_id = primary_display_id; 173 layout->primary_id = primary_display_id;
174 174
175 ash::Shell::GetInstance() 175 ash::Shell::GetInstance()
176 ->display_configuration_controller() 176 ->display_configuration_controller()
177 ->SetDisplayLayout(std::move(layout), false /* user_action */); 177 ->SetDisplayLayout(std::move(layout), false /* user_action */);
178 } 178 }
179 179
180 // Validates that parameters passed to the SetInfo function are valid for the 180 // Validates that parameters passed to the SetInfo function are valid for the
181 // desired display and the current display manager state. 181 // desired display and the current display manager state.
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 return all_displays; 417 return all_displays;
418 } 418 }
419 419
420 // static 420 // static
421 DisplayInfoProvider* DisplayInfoProvider::Create() { 421 DisplayInfoProvider* DisplayInfoProvider::Create() {
422 return new DisplayInfoProviderChromeOS(); 422 return new DisplayInfoProviderChromeOS();
423 } 423 }
424 424
425 } // namespace extensions 425 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/default_apps_unittest.cc ('k') | chrome/browser/extensions/error_console/error_console.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698