OLD | NEW |
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/mus/sysui_application.h" | 5 #include "ash/mus/sysui_application.h" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
8 #include "ash/host/ash_window_tree_host_init_params.h" | 8 #include "ash/host/ash_window_tree_host_init_params.h" |
9 #include "ash/host/ash_window_tree_host_platform.h" | 9 #include "ash/host/ash_window_tree_host_platform.h" |
10 #include "ash/mus/keyboard_ui_mus.h" | 10 #include "ash/mus/keyboard_ui_mus.h" |
| 11 #include "ash/mus/shelf_delegate_mus.h" |
11 #include "ash/mus/shell_delegate_mus.h" | 12 #include "ash/mus/shell_delegate_mus.h" |
12 #include "ash/mus/stub_context_factory.h" | 13 #include "ash/mus/stub_context_factory.h" |
13 #include "ash/root_window_settings.h" | 14 #include "ash/root_window_settings.h" |
14 #include "ash/shell.h" | 15 #include "ash/shell.h" |
15 #include "ash/shell_init_params.h" | 16 #include "ash/shell_init_params.h" |
16 #include "ash/shell_window_ids.h" | 17 #include "ash/shell_window_ids.h" |
17 #include "base/bind.h" | 18 #include "base/bind.h" |
18 #include "base/files/file_path.h" | 19 #include "base/files/file_path.h" |
19 #include "base/path_service.h" | 20 #include "base/path_service.h" |
20 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 SysUIApplication::~SysUIApplication() {} | 288 SysUIApplication::~SysUIApplication() {} |
288 | 289 |
289 void SysUIApplication::Initialize(mojo::Connector* connector, | 290 void SysUIApplication::Initialize(mojo::Connector* connector, |
290 const mojo::Identity& identity, | 291 const mojo::Identity& identity, |
291 uint32_t id) { | 292 uint32_t id) { |
292 ash_init_.reset(new AshInit()); | 293 ash_init_.reset(new AshInit()); |
293 ash_init_->Initialize(connector); | 294 ash_init_->Initialize(connector); |
294 } | 295 } |
295 | 296 |
296 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) { | 297 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) { |
| 298 connection->AddInterface<mash::shelf::mojom::ShelfController>(this); |
297 return true; | 299 return true; |
298 } | 300 } |
299 | 301 |
| 302 void SysUIApplication::Create( |
| 303 mojo::Connection* connection, |
| 304 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
| 305 mash::shelf::mojom::ShelfController* shelf_controller = |
| 306 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
| 307 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| 308 } |
| 309 |
300 } // namespace sysui | 310 } // namespace sysui |
301 } // namespace ash | 311 } // namespace ash |
OLD | NEW |