Chromium Code Reviews| 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 <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/desktop_background/desktop_background_controller.h" | 12 #include "ash/desktop_background/desktop_background_controller.h" |
| 13 #include "ash/host/ash_window_tree_host_init_params.h" | 13 #include "ash/host/ash_window_tree_host_init_params.h" |
| 14 #include "ash/host/ash_window_tree_host_platform.h" | 14 #include "ash/host/ash_window_tree_host_platform.h" |
| 15 #include "ash/material_design/material_design_controller.h" | |
| 15 #include "ash/mus/app_list_presenter_mus.h" | 16 #include "ash/mus/app_list_presenter_mus.h" |
| 16 #include "ash/mus/keyboard_ui_mus.h" | 17 #include "ash/mus/keyboard_ui_mus.h" |
| 17 #include "ash/mus/shelf_delegate_mus.h" | 18 #include "ash/mus/shelf_delegate_mus.h" |
| 18 #include "ash/mus/shell_delegate_mus.h" | 19 #include "ash/mus/shell_delegate_mus.h" |
| 19 #include "ash/mus/stub_context_factory.h" | 20 #include "ash/mus/stub_context_factory.h" |
| 20 #include "ash/root_window_settings.h" | 21 #include "ash/root_window_settings.h" |
| 21 #include "ash/shell.h" | 22 #include "ash/shell.h" |
| 22 #include "ash/shell_init_params.h" | 23 #include "ash/shell_init_params.h" |
| 23 #include "ash/shell_window_ids.h" | 24 #include "ash/shell_window_ids.h" |
| 24 #include "base/bind.h" | 25 #include "base/bind.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 } | 192 } |
| 192 | 193 |
| 193 ~AshInit() { worker_pool_->Shutdown(); } | 194 ~AshInit() { worker_pool_->Shutdown(); } |
| 194 | 195 |
| 195 aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); } | 196 aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); } |
| 196 | 197 |
| 197 void Initialize(::shell::Connector* connector, | 198 void Initialize(::shell::Connector* connector, |
| 198 const ::shell::Identity& identity) { | 199 const ::shell::Identity& identity) { |
| 199 InitializeResourceBundle(connector); | 200 InitializeResourceBundle(connector); |
| 200 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 201 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
| 202 ash::MaterialDesignController::Initialize(); | |
|
msw
2016/05/16 21:29:43
nit: perhaps also call ui::MaterialDesignControlle
James Cook
2016/05/16 21:32:18
ui::MaterialDesignController::Initialize() is done
msw
2016/05/16 21:34:57
Acknowledged.
| |
| 201 views::WindowManagerConnection::Create(connector, identity); | 203 views::WindowManagerConnection::Create(connector, identity); |
| 202 | 204 |
| 203 display::Screen* screen = display::Screen::GetScreen(); | 205 display::Screen* screen = display::Screen::GetScreen(); |
| 204 DCHECK(screen); | 206 DCHECK(screen); |
| 205 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); | 207 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); |
| 206 | 208 |
| 207 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash | 209 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash |
| 208 // installs and uses the ScreenAsh. This can be removed once ash learns to | 210 // installs and uses the ScreenAsh. This can be removed once ash learns to |
| 209 // talk to mus for managing displays. | 211 // talk to mus for managing displays. |
| 210 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 | 212 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 void SysUIApplication::Create( | 326 void SysUIApplication::Create( |
| 325 ::shell::Connection* connection, | 327 ::shell::Connection* connection, |
| 326 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { | 328 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
| 327 mash::shelf::mojom::ShelfController* shelf_controller = | 329 mash::shelf::mojom::ShelfController* shelf_controller = |
| 328 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 330 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
| 329 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 331 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| 330 } | 332 } |
| 331 | 333 |
| 332 } // namespace sysui | 334 } // namespace sysui |
| 333 } // namespace ash | 335 } // namespace ash |
| OLD | NEW |