| 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/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" | |
| 25 #include "ash/sysui/keyboard_ui_mus.h" | 24 #include "ash/sysui/keyboard_ui_mus.h" |
| 26 #include "ash/sysui/shell_delegate_mus.h" | 25 #include "ash/sysui/shell_delegate_mus.h" |
| 27 #include "ash/sysui/stub_context_factory.h" | 26 #include "ash/sysui/stub_context_factory.h" |
| 28 #include "base/bind.h" | 27 #include "base/bind.h" |
| 29 #include "base/files/file_path.h" | 28 #include "base/files/file_path.h" |
| 30 #include "base/path_service.h" | 29 #include "base/path_service.h" |
| 31 #include "base/threading/sequenced_worker_pool.h" | 30 #include "base/threading/sequenced_worker_pool.h" |
| 32 #include "services/catalog/public/cpp/resource_loader.h" | 31 #include "services/catalog/public/cpp/resource_loader.h" |
| 33 #include "services/shell/public/cpp/connector.h" | 32 #include "services/shell/public/cpp/connector.h" |
| 34 #include "services/ui/public/cpp/property_type_converters.h" | 33 #include "services/ui/public/cpp/property_type_converters.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // talk to mus for managing displays. | 227 // talk to mus for managing displays. |
| 229 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 | 228 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 |
| 230 display::Screen::SetScreenInstance(nullptr); | 229 display::Screen::SetScreenInstance(nullptr); |
| 231 | 230 |
| 232 // Install some hook so that the WindowTreeHostMus created for widgets can | 231 // Install some hook so that the WindowTreeHostMus created for widgets can |
| 233 // be hooked up correctly. | 232 // be hooked up correctly. |
| 234 native_widget_factory_.reset(new NativeWidgetFactory()); | 233 native_widget_factory_.reset(new NativeWidgetFactory()); |
| 235 | 234 |
| 236 AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); | 235 AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); |
| 237 | 236 |
| 238 std::unique_ptr<AppListPresenterMus> app_list_presenter = | 237 ash_delegate_ = new ShellDelegateMus(); |
| 239 base::MakeUnique<AppListPresenterMus>(connector); | |
| 240 ash_delegate_ = new ShellDelegateMus(std::move(app_list_presenter)); | |
| 241 | 238 |
| 242 InitializeComponents(); | 239 InitializeComponents(); |
| 243 | 240 |
| 244 ShellInitParams init_params; | 241 ShellInitParams init_params; |
| 245 init_params.delegate = ash_delegate_; | 242 init_params.delegate = ash_delegate_; |
| 246 init_params.context_factory = new StubContextFactory; | 243 init_params.context_factory = new StubContextFactory; |
| 247 init_params.blocking_pool = worker_pool_.get(); | 244 init_params.blocking_pool = worker_pool_.get(); |
| 248 init_params.in_mus = true; | 245 init_params.in_mus = true; |
| 249 init_params.keyboard_factory = | 246 init_params.keyboard_factory = |
| 250 base::Bind(&KeyboardUIMus::Create, connector); | 247 base::Bind(&KeyboardUIMus::Create, connector); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 input_device_client_.Connect(std::move(server)); | 317 input_device_client_.Connect(std::move(server)); |
| 321 } | 318 } |
| 322 | 319 |
| 323 bool SysUIApplication::OnConnect(const ::shell::Identity& remote_identity, | 320 bool SysUIApplication::OnConnect(const ::shell::Identity& remote_identity, |
| 324 ::shell::InterfaceRegistry* registry) { | 321 ::shell::InterfaceRegistry* registry) { |
| 325 return true; | 322 return true; |
| 326 } | 323 } |
| 327 | 324 |
| 328 } // namespace sysui | 325 } // namespace sysui |
| 329 } // namespace ash | 326 } // namespace ash |
| OLD | NEW |