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

Side by Side Diff: ash/sysui/sysui_application.cc

Issue 2257763002: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/sysui/sysui_application.h" 5 #include "ash/sysui/sysui_application.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 231 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300
232 display::Screen::SetScreenInstance(nullptr); 232 display::Screen::SetScreenInstance(nullptr);
233 233
234 // Install some hook so that the WindowTreeHostMus created for widgets can 234 // Install some hook so that the WindowTreeHostMus created for widgets can
235 // be hooked up correctly. 235 // be hooked up correctly.
236 native_widget_factory_.reset(new NativeWidgetFactory()); 236 native_widget_factory_.reset(new NativeWidgetFactory());
237 237
238 AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); 238 AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus));
239 239
240 std::unique_ptr<AppListPresenterMus> app_list_presenter = 240 std::unique_ptr<AppListPresenterMus> app_list_presenter =
241 base::WrapUnique(new AppListPresenterMus(connector)); 241 base::MakeUnique<AppListPresenterMus>(connector);
242 ash_delegate_ = new ShellDelegateMus(std::move(app_list_presenter)); 242 ash_delegate_ = new ShellDelegateMus(std::move(app_list_presenter));
243 243
244 InitializeComponents(); 244 InitializeComponents();
245 245
246 ShellInitParams init_params; 246 ShellInitParams init_params;
247 init_params.delegate = ash_delegate_; 247 init_params.delegate = ash_delegate_;
248 init_params.context_factory = new StubContextFactory; 248 init_params.context_factory = new StubContextFactory;
249 init_params.blocking_pool = worker_pool_.get(); 249 init_params.blocking_pool = worker_pool_.get();
250 init_params.in_mus = true; 250 init_params.in_mus = true;
251 init_params.keyboard_factory = 251 init_params.keyboard_factory =
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 mojom::WallpaperControllerRequest request) { 342 mojom::WallpaperControllerRequest request) {
343 mojom::WallpaperController* wallpaper_controller = 343 mojom::WallpaperController* wallpaper_controller =
344 static_cast<UserWallpaperDelegateMus*>( 344 static_cast<UserWallpaperDelegateMus*>(
345 Shell::GetInstance()->user_wallpaper_delegate()); 345 Shell::GetInstance()->user_wallpaper_delegate());
346 wallpaper_controller_bindings_.AddBinding(wallpaper_controller, 346 wallpaper_controller_bindings_.AddBinding(wallpaper_controller,
347 std::move(request)); 347 std::move(request));
348 } 348 }
349 349
350 } // namespace sysui 350 } // namespace sysui
351 } // namespace ash 351 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc ('k') | ash/wm/drag_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698