| 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> |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 ~AshInit() { worker_pool_->Shutdown(); } | 192 ~AshInit() { worker_pool_->Shutdown(); } |
| 193 | 193 |
| 194 aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); } | 194 aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); } |
| 195 | 195 |
| 196 void Initialize(::shell::Connector* connector, | 196 void Initialize(::shell::Connector* connector, |
| 197 const ::shell::Identity& identity) { | 197 const ::shell::Identity& identity) { |
| 198 InitializeResourceBundle(connector); | 198 InitializeResourceBundle(connector); |
| 199 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 199 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
| 200 views::WindowManagerConnection::Create(connector, identity); | 200 views::WindowManagerConnection::Create(connector, identity); |
| 201 | 201 |
| 202 gfx::Screen* screen = gfx::Screen::GetScreen(); | 202 display::Screen* screen = display::Screen::GetScreen(); |
| 203 DCHECK(screen); | 203 DCHECK(screen); |
| 204 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); | 204 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); |
| 205 | 205 |
| 206 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash | 206 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash |
| 207 // installs and uses the ScreenAsh. This can be removed once ash learns to | 207 // installs and uses the ScreenAsh. This can be removed once ash learns to |
| 208 // talk to mus for managing displays. | 208 // talk to mus for managing displays. |
| 209 gfx::Screen::SetScreenInstance(nullptr); | 209 display::Screen::SetScreenInstance(nullptr); |
| 210 | 210 |
| 211 // Install some hook so that the WindowTreeHostMus created for widgets can | 211 // Install some hook so that the WindowTreeHostMus created for widgets can |
| 212 // be hooked up correctly. | 212 // be hooked up correctly. |
| 213 native_widget_factory_.reset(new NativeWidgetFactory()); | 213 native_widget_factory_.reset(new NativeWidgetFactory()); |
| 214 | 214 |
| 215 ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); | 215 ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); |
| 216 ash_delegate_ = new ShellDelegateMus; | 216 ash_delegate_ = new ShellDelegateMus; |
| 217 | 217 |
| 218 InitializeComponents(); | 218 InitializeComponents(); |
| 219 | 219 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 void SysUIApplication::Create( | 318 void SysUIApplication::Create( |
| 319 ::shell::Connection* connection, | 319 ::shell::Connection* connection, |
| 320 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { | 320 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
| 321 mash::shelf::mojom::ShelfController* shelf_controller = | 321 mash::shelf::mojom::ShelfController* shelf_controller = |
| 322 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 322 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
| 323 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 323 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace sysui | 326 } // namespace sysui |
| 327 } // namespace ash | 327 } // namespace ash |
| OLD | NEW |