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

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: 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // display. 160 // display.
161 void UpdateDisplayLayout(const gfx::Rect& primary_display_bounds, 161 void UpdateDisplayLayout(const gfx::Rect& primary_display_bounds,
162 int64_t primary_display_id, 162 int64_t primary_display_id,
163 const gfx::Rect& target_display_bounds, 163 const gfx::Rect& target_display_bounds,
164 int64_t target_display_id) { 164 int64_t target_display_id) {
165 ash::DisplayPlacement placement(CreatePlacementForRectangles( 165 ash::DisplayPlacement placement(CreatePlacementForRectangles(
166 primary_display_bounds, target_display_bounds)); 166 primary_display_bounds, target_display_bounds));
167 placement.display_id = target_display_id; 167 placement.display_id = target_display_id;
168 placement.parent_display_id = primary_display_id; 168 placement.parent_display_id = primary_display_id;
169 169
170 scoped_ptr<ash::DisplayLayout> layout(new ash::DisplayLayout); 170 std::unique_ptr<ash::DisplayLayout> layout(new ash::DisplayLayout);
171 layout->placement_list.push_back(placement); 171 layout->placement_list.push_back(placement);
172 layout->primary_id = primary_display_id; 172 layout->primary_id = primary_display_id;
173 173
174 ash::Shell::GetInstance() 174 ash::Shell::GetInstance()
175 ->display_configuration_controller() 175 ->display_configuration_controller()
176 ->SetDisplayLayout(std::move(layout), false /* user_action */); 176 ->SetDisplayLayout(std::move(layout), false /* user_action */);
177 } 177 }
178 178
179 // Validates that parameters passed to the SetInfo function are valid for the 179 // Validates that parameters passed to the SetInfo function are valid for the
180 // desired display and the current display manager state. 180 // desired display and the current display manager state.
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 return all_displays; 416 return all_displays;
417 } 417 }
418 418
419 // static 419 // static
420 DisplayInfoProvider* DisplayInfoProvider::Create() { 420 DisplayInfoProvider* DisplayInfoProvider::Create() {
421 return new DisplayInfoProviderChromeOS(); 421 return new DisplayInfoProviderChromeOS();
422 } 422 }
423 423
424 } // namespace extensions 424 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698