| 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> |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 ~AshInit() { worker_pool_->Shutdown(); } | 211 ~AshInit() { worker_pool_->Shutdown(); } |
| 212 | 212 |
| 213 aura::Window* root() { return Shell::GetPrimaryRootWindow(); } | 213 aura::Window* root() { return Shell::GetPrimaryRootWindow(); } |
| 214 | 214 |
| 215 void Initialize(::shell::Connector* connector, | 215 void Initialize(::shell::Connector* connector, |
| 216 const ::shell::Identity& identity) { | 216 const ::shell::Identity& identity) { |
| 217 InitializeResourceBundle(connector); | 217 InitializeResourceBundle(connector); |
| 218 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 218 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
| 219 MaterialDesignController::Initialize(); | 219 MaterialDesignController::Initialize(); |
| 220 views::WindowManagerConnection::Create(connector, identity); | 220 window_manager_connection_ = |
| 221 views::WindowManagerConnection::Create(connector, identity); |
| 221 | 222 |
| 222 display::Screen* screen = display::Screen::GetScreen(); | 223 display::Screen* screen = display::Screen::GetScreen(); |
| 223 DCHECK(screen); | 224 DCHECK(screen); |
| 224 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); | 225 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); |
| 225 | 226 |
| 226 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash | 227 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash |
| 227 // installs and uses the ScreenAsh. This can be removed once ash learns to | 228 // installs and uses the ScreenAsh. This can be removed once ash learns to |
| 228 // talk to mus for managing displays. | 229 // talk to mus for managing displays. |
| 229 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 | 230 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 |
| 230 display::Screen::SetScreenInstance(nullptr); | 231 display::Screen::SetScreenInstance(nullptr); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 chromeos::DBusClientBundle::BLUETOOTH)); | 294 chromeos::DBusClientBundle::BLUETOOTH)); |
| 294 chromeos::CrasAudioHandler::InitializeForTesting(); | 295 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 295 #endif | 296 #endif |
| 296 } | 297 } |
| 297 | 298 |
| 298 private: | 299 private: |
| 299 scoped_refptr<base::SequencedWorkerPool> worker_pool_; | 300 scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
| 300 std::unique_ptr<views::AuraInit> aura_init_; | 301 std::unique_ptr<views::AuraInit> aura_init_; |
| 301 ShellDelegateMus* ash_delegate_ = nullptr; | 302 ShellDelegateMus* ash_delegate_ = nullptr; |
| 302 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; | 303 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; |
| 304 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; |
| 303 | 305 |
| 304 DISALLOW_COPY_AND_ASSIGN(AshInit); | 306 DISALLOW_COPY_AND_ASSIGN(AshInit); |
| 305 }; | 307 }; |
| 306 | 308 |
| 307 SysUIApplication::SysUIApplication() {} | 309 SysUIApplication::SysUIApplication() {} |
| 308 | 310 |
| 309 SysUIApplication::~SysUIApplication() {} | 311 SysUIApplication::~SysUIApplication() {} |
| 310 | 312 |
| 311 void SysUIApplication::Initialize(::shell::Connector* connector, | 313 void SysUIApplication::Initialize(::shell::Connector* connector, |
| 312 const ::shell::Identity& identity, | 314 const ::shell::Identity& identity, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 333 mojom::WallpaperControllerRequest request) { | 335 mojom::WallpaperControllerRequest request) { |
| 334 mojom::WallpaperController* wallpaper_controller = | 336 mojom::WallpaperController* wallpaper_controller = |
| 335 static_cast<UserWallpaperDelegateMus*>( | 337 static_cast<UserWallpaperDelegateMus*>( |
| 336 Shell::GetInstance()->user_wallpaper_delegate()); | 338 Shell::GetInstance()->user_wallpaper_delegate()); |
| 337 wallpaper_controller_bindings_.AddBinding(wallpaper_controller, | 339 wallpaper_controller_bindings_.AddBinding(wallpaper_controller, |
| 338 std::move(request)); | 340 std::move(request)); |
| 339 } | 341 } |
| 340 | 342 |
| 341 } // namespace sysui | 343 } // namespace sysui |
| 342 } // namespace ash | 344 } // namespace ash |
| OLD | NEW |