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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
193 | 193 |
194 ~AshInit() { worker_pool_->Shutdown(); } | 194 ~AshInit() { worker_pool_->Shutdown(); } |
195 | 195 |
196 aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); } | 196 aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); } |
197 | 197 |
198 void Initialize(::shell::Connector* connector, | 198 void Initialize(::shell::Connector* connector, |
199 const ::shell::Identity& identity) { | 199 const ::shell::Identity& identity) { |
200 InitializeResourceBundle(connector); | 200 InitializeResourceBundle(connector); |
201 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(); | 202 ash::MaterialDesignController::Initialize(); |
203 views::WindowManagerConnection::Create(connector, identity); | 203 views_mus_ = views::WindowManagerConnection::Create(connector, identity); |
204 | 204 |
205 display::Screen* screen = display::Screen::GetScreen(); | 205 display::Screen* screen = display::Screen::GetScreen(); |
206 DCHECK(screen); | 206 DCHECK(screen); |
207 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); | 207 gfx::Size size = screen->GetPrimaryDisplay().bounds().size(); |
208 | 208 |
209 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash | 209 // Uninstall the ScreenMus installed by WindowManagerConnection, so that ash |
210 // 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 |
211 // talk to mus for managing displays. | 211 // talk to mus for managing displays. |
212 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 | 212 // TODO(mfomitchev): We need to fix this. http://crbug.com/607300 |
213 display::Screen::SetScreenInstance(nullptr); | 213 display::Screen::SetScreenInstance(nullptr); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 chromeos::DBusClientBundle::BLUETOOTH)); | 296 chromeos::DBusClientBundle::BLUETOOTH)); |
297 chromeos::CrasAudioHandler::InitializeForTesting(); | 297 chromeos::CrasAudioHandler::InitializeForTesting(); |
298 #endif | 298 #endif |
299 } | 299 } |
300 | 300 |
301 private: | 301 private: |
302 scoped_refptr<base::SequencedWorkerPool> worker_pool_; | 302 scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
303 std::unique_ptr<views::AuraInit> aura_init_; | 303 std::unique_ptr<views::AuraInit> aura_init_; |
304 ShellDelegateMus* ash_delegate_ = nullptr; | 304 ShellDelegateMus* ash_delegate_ = nullptr; |
305 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; | 305 std::unique_ptr<NativeWidgetFactory> native_widget_factory_; |
306 std::unique_ptr<views::WindowManagerConnection> views_mus_; | |
sky
2016/05/31 18:57:24
views_mus_->window_manager_connection_
sadrul
2016/05/31 20:02:44
Done.
| |
306 | 307 |
307 DISALLOW_COPY_AND_ASSIGN(AshInit); | 308 DISALLOW_COPY_AND_ASSIGN(AshInit); |
308 }; | 309 }; |
309 | 310 |
310 SysUIApplication::SysUIApplication() {} | 311 SysUIApplication::SysUIApplication() {} |
311 | 312 |
312 SysUIApplication::~SysUIApplication() {} | 313 SysUIApplication::~SysUIApplication() {} |
313 | 314 |
314 void SysUIApplication::Initialize(::shell::Connector* connector, | 315 void SysUIApplication::Initialize(::shell::Connector* connector, |
315 const ::shell::Identity& identity, | 316 const ::shell::Identity& identity, |
(...skipping 10 matching lines...) Expand all Loading... | |
326 void SysUIApplication::Create( | 327 void SysUIApplication::Create( |
327 ::shell::Connection* connection, | 328 ::shell::Connection* connection, |
328 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { | 329 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
329 mash::shelf::mojom::ShelfController* shelf_controller = | 330 mash::shelf::mojom::ShelfController* shelf_controller = |
330 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 331 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
331 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 332 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
332 } | 333 } |
333 | 334 |
334 } // namespace sysui | 335 } // namespace sysui |
335 } // namespace ash | 336 } // namespace ash |
OLD | NEW |