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

Side by Side Diff: extensions/shell/browser/shell_desktop_controller_aura.cc

Issue 2252373002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 "extensions/shell/browser/shell_desktop_controller_aura.h" 5 #include "extensions/shell/browser/shell_desktop_controller_aura.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 extensions::AppWindowClient::Set(app_window_client_.get()); 178 extensions::AppWindowClient::Set(app_window_client_.get());
179 179
180 #if defined(OS_CHROMEOS) 180 #if defined(OS_CHROMEOS)
181 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( 181 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(
182 this); 182 this);
183 display_configurator_.reset(new ui::DisplayConfigurator); 183 display_configurator_.reset(new ui::DisplayConfigurator);
184 #if defined(USE_OZONE) 184 #if defined(USE_OZONE)
185 display_configurator_->Init( 185 display_configurator_->Init(
186 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(), false); 186 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(), false);
187 #elif defined(USE_X11) 187 #elif defined(USE_X11)
188 display_configurator_->Init( 188 display_configurator_->Init(base::MakeUnique<ui::NativeDisplayDelegateX11>(),
189 base::WrapUnique(new ui::NativeDisplayDelegateX11()), false); 189 false);
190 #endif 190 #endif
191 display_configurator_->ForceInitialConfigure(0); 191 display_configurator_->ForceInitialConfigure(0);
192 display_configurator_->AddObserver(this); 192 display_configurator_->AddObserver(this);
193 #endif 193 #endif
194 CreateRootWindow(); 194 CreateRootWindow();
195 } 195 }
196 196
197 ShellDesktopControllerAura::~ShellDesktopControllerAura() { 197 ShellDesktopControllerAura::~ShellDesktopControllerAura() {
198 CloseAppWindows(); 198 CloseAppWindows();
199 DestroyRootWindow(); 199 DestroyRootWindow();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 if (displays.empty()) 359 if (displays.empty())
360 return gfx::Size(); 360 return gfx::Size();
361 const ui::DisplayMode* mode = displays[0]->current_mode(); 361 const ui::DisplayMode* mode = displays[0]->current_mode();
362 return mode ? mode->size() : gfx::Size(); 362 return mode ? mode->size() : gfx::Size();
363 #else 363 #else
364 return gfx::Size(); 364 return gfx::Size();
365 #endif 365 #endif
366 } 366 }
367 367
368 } // namespace extensions 368 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/script_injection_manager.cc ('k') | extensions/shell/browser/shell_extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698