| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; | 299 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; |
| 300 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; | 300 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; |
| 301 | 301 |
| 302 DISALLOW_COPY_AND_ASSIGN(AshInit); | 302 DISALLOW_COPY_AND_ASSIGN(AshInit); |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 SysUIApplication::SysUIApplication() {} | 305 SysUIApplication::SysUIApplication() {} |
| 306 | 306 |
| 307 SysUIApplication::~SysUIApplication() {} | 307 SysUIApplication::~SysUIApplication() {} |
| 308 | 308 |
| 309 void SysUIApplication::Initialize(::shell::Connector* connector, | 309 void SysUIApplication::OnStart(::shell::Connector* connector, |
| 310 const ::shell::Identity& identity, | 310 const ::shell::Identity& identity, |
| 311 uint32_t id) { | 311 uint32_t id) { |
| 312 ui::GpuService::Initialize(connector); | 312 ui::GpuService::Initialize(connector); |
| 313 | 313 |
| 314 ash_init_.reset(new AshInit()); | 314 ash_init_.reset(new AshInit()); |
| 315 ash_init_->Initialize(connector, identity); | 315 ash_init_->Initialize(connector, identity); |
| 316 | 316 |
| 317 ui::mojom::InputDeviceServerPtr server; | 317 ui::mojom::InputDeviceServerPtr server; |
| 318 connector->ConnectToInterface("mojo:ui", &server); | 318 connector->ConnectToInterface("mojo:ui", &server); |
| 319 input_device_client_.Connect(std::move(server)); | 319 input_device_client_.Connect(std::move(server)); |
| 320 } | 320 } |
| 321 | 321 |
| 322 bool SysUIApplication::AcceptConnection(::shell::Connection* connection) { | 322 bool SysUIApplication::OnConnect(::shell::Connection* connection) { |
| 323 connection->AddInterface<mash::shelf::mojom::ShelfController>(this); | 323 connection->AddInterface<mash::shelf::mojom::ShelfController>(this); |
| 324 connection->AddInterface<mojom::WallpaperController>(this); | 324 connection->AddInterface<mojom::WallpaperController>(this); |
| 325 return true; | 325 return true; |
| 326 } | 326 } |
| 327 | 327 |
| 328 void SysUIApplication::Create( | 328 void SysUIApplication::Create( |
| 329 ::shell::Connection* connection, | 329 ::shell::Connection* connection, |
| 330 mash::shelf::mojom::ShelfControllerRequest request) { | 330 mash::shelf::mojom::ShelfControllerRequest request) { |
| 331 mash::shelf::mojom::ShelfController* shelf_controller = | 331 mash::shelf::mojom::ShelfController* shelf_controller = |
| 332 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 332 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
| 333 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 333 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void SysUIApplication::Create(::shell::Connection* connection, | 336 void SysUIApplication::Create(::shell::Connection* connection, |
| 337 mojom::WallpaperControllerRequest request) { | 337 mojom::WallpaperControllerRequest request) { |
| 338 mojom::WallpaperController* wallpaper_controller = | 338 mojom::WallpaperController* wallpaper_controller = |
| 339 static_cast<UserWallpaperDelegateMus*>( | 339 static_cast<UserWallpaperDelegateMus*>( |
| 340 Shell::GetInstance()->user_wallpaper_delegate()); | 340 Shell::GetInstance()->user_wallpaper_delegate()); |
| 341 wallpaper_controller_bindings_.AddBinding(wallpaper_controller, | 341 wallpaper_controller_bindings_.AddBinding(wallpaper_controller, |
| 342 std::move(request)); | 342 std::move(request)); |
| 343 } | 343 } |
| 344 | 344 |
| 345 } // namespace sysui | 345 } // namespace sysui |
| 346 } // namespace ash | 346 } // namespace ash |
| OLD | NEW |