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

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

Issue 2259153002: mash: Port ash_sysui ShelfDelegateMus impl to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 3 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/sysui/sysui_application.h ('k') | chrome/app/mojo/chrome_manifest.json » ('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 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>
11 11
12 #include "ash/common/login_status.h" 12 #include "ash/common/login_status.h"
13 #include "ash/common/material_design/material_design_controller.h" 13 #include "ash/common/material_design/material_design_controller.h"
14 #include "ash/common/shell_window_ids.h" 14 #include "ash/common/shell_window_ids.h"
15 #include "ash/common/wm_shell.h" 15 #include "ash/common/wm_shell.h"
16 #include "ash/display/display_manager.h" 16 #include "ash/display/display_manager.h"
17 #include "ash/host/ash_window_tree_host_init_params.h" 17 #include "ash/host/ash_window_tree_host_init_params.h"
18 #include "ash/host/ash_window_tree_host_platform.h" 18 #include "ash/host/ash_window_tree_host_platform.h"
19 #include "ash/public/interfaces/ash_window_type.mojom.h" 19 #include "ash/public/interfaces/ash_window_type.mojom.h"
20 #include "ash/public/interfaces/container.mojom.h" 20 #include "ash/public/interfaces/container.mojom.h"
21 #include "ash/root_window_settings.h" 21 #include "ash/root_window_settings.h"
22 #include "ash/shell.h" 22 #include "ash/shell.h"
23 #include "ash/shell_init_params.h" 23 #include "ash/shell_init_params.h"
24 #include "ash/sysui/app_list_presenter_mus.h" 24 #include "ash/sysui/app_list_presenter_mus.h"
25 #include "ash/sysui/keyboard_ui_mus.h" 25 #include "ash/sysui/keyboard_ui_mus.h"
26 #include "ash/sysui/shelf_delegate_mus.h"
27 #include "ash/sysui/shell_delegate_mus.h" 26 #include "ash/sysui/shell_delegate_mus.h"
28 #include "ash/sysui/stub_context_factory.h" 27 #include "ash/sysui/stub_context_factory.h"
29 #include "ash/sysui/wallpaper_delegate_mus.h" 28 #include "ash/sysui/wallpaper_delegate_mus.h"
30 #include "base/bind.h" 29 #include "base/bind.h"
31 #include "base/files/file_path.h" 30 #include "base/files/file_path.h"
32 #include "base/path_service.h" 31 #include "base/path_service.h"
33 #include "base/threading/sequenced_worker_pool.h" 32 #include "base/threading/sequenced_worker_pool.h"
34 #include "services/catalog/public/cpp/resource_loader.h" 33 #include "services/catalog/public/cpp/resource_loader.h"
35 #include "services/shell/public/cpp/connector.h" 34 #include "services/shell/public/cpp/connector.h"
36 #include "services/ui/public/cpp/property_type_converters.h" 35 #include "services/ui/public/cpp/property_type_converters.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 ash_init_.reset(new AshInit()); 316 ash_init_.reset(new AshInit());
318 ash_init_->Initialize(connector(), identity); 317 ash_init_->Initialize(connector(), identity);
319 318
320 ui::mojom::InputDeviceServerPtr server; 319 ui::mojom::InputDeviceServerPtr server;
321 connector()->ConnectToInterface("mojo:ui", &server); 320 connector()->ConnectToInterface("mojo:ui", &server);
322 input_device_client_.Connect(std::move(server)); 321 input_device_client_.Connect(std::move(server));
323 } 322 }
324 323
325 bool SysUIApplication::OnConnect(const ::shell::Identity& remote_identity, 324 bool SysUIApplication::OnConnect(const ::shell::Identity& remote_identity,
326 ::shell::InterfaceRegistry* registry) { 325 ::shell::InterfaceRegistry* registry) {
327 registry->AddInterface<mash::shelf::mojom::ShelfController>(this);
328 registry->AddInterface<mojom::WallpaperController>(this); 326 registry->AddInterface<mojom::WallpaperController>(this);
329 return true; 327 return true;
330 } 328 }
331 329
332 void SysUIApplication::Create(
333 const ::shell::Identity& remote_identity,
334 mash::shelf::mojom::ShelfControllerRequest request) {
335 mash::shelf::mojom::ShelfController* shelf_controller =
336 static_cast<ShelfDelegateMus*>(WmShell::Get()->shelf_delegate());
337 DCHECK(shelf_controller);
338 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request));
339 }
340
341 void SysUIApplication::Create(const ::shell::Identity& remote_identity, 330 void SysUIApplication::Create(const ::shell::Identity& remote_identity,
342 mojom::WallpaperControllerRequest request) { 331 mojom::WallpaperControllerRequest request) {
343 mojom::WallpaperController* wallpaper_controller = 332 mojom::WallpaperController* wallpaper_controller =
344 static_cast<WallpaperDelegateMus*>(WmShell::Get()->wallpaper_delegate()); 333 static_cast<WallpaperDelegateMus*>(WmShell::Get()->wallpaper_delegate());
345 wallpaper_controller_bindings_.AddBinding(wallpaper_controller, 334 wallpaper_controller_bindings_.AddBinding(wallpaper_controller,
346 std::move(request)); 335 std::move(request));
347 } 336 }
348 337
349 } // namespace sysui 338 } // namespace sysui
350 } // namespace ash 339 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sysui/sysui_application.h ('k') | chrome/app/mojo/chrome_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698