| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/window_manager_application.h" | 5 #include "ash/mus/window_manager_application.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/mus/accelerators/accelerator_registrar_impl.h" | 10 #include "ash/mus/accelerators/accelerator_registrar_impl.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void WindowManagerApplication::InitWindowManager( | 89 void WindowManagerApplication::InitWindowManager( |
| 90 ui::WindowTreeClient* window_tree_client) { | 90 ui::WindowTreeClient* window_tree_client) { |
| 91 InitializeComponents(); | 91 InitializeComponents(); |
| 92 | 92 |
| 93 window_manager_->Init(window_tree_client); | 93 window_manager_->Init(window_tree_client); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void WindowManagerApplication::OnStart(const shell::Identity& identity) { | 96 void WindowManagerApplication::OnStart(const shell::Identity& identity) { |
| 97 aura_init_.reset(new views::AuraInit(connector(), "ash_mus_resources.pak")); | 97 aura_init_.reset(new views::AuraInit(connector(), "ash_mus_resources.pak")); |
| 98 gpu_service_ = ui::GpuService::Initialize(connector()); | 98 gpu_service_ = ui::GpuService::Initialize(connector()); |
| 99 compositor_context_factory_.reset(new views::SurfaceContextFactory()); | 99 compositor_context_factory_.reset( |
| 100 new views::SurfaceContextFactory(gpu_service_.get())); |
| 100 aura::Env::GetInstance()->set_context_factory( | 101 aura::Env::GetInstance()->set_context_factory( |
| 101 compositor_context_factory_.get()); | 102 compositor_context_factory_.get()); |
| 102 window_manager_.reset(new WindowManager(connector())); | 103 window_manager_.reset(new WindowManager(connector())); |
| 103 | 104 |
| 104 MaterialDesignController::Initialize(); | 105 MaterialDesignController::Initialize(); |
| 105 | 106 |
| 106 tracing_.Initialize(connector(), identity.name()); | 107 tracing_.Initialize(connector(), identity.name()); |
| 107 | 108 |
| 108 ui::WindowTreeClient* window_tree_client = new ui::WindowTreeClient( | 109 ui::WindowTreeClient* window_tree_client = new ui::WindowTreeClient( |
| 109 window_manager_.get(), window_manager_.get(), nullptr); | 110 window_manager_.get(), window_manager_.get(), nullptr); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, | 142 base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed, |
| 142 base::Unretained(this)))); | 143 base::Unretained(this)))); |
| 143 } | 144 } |
| 144 | 145 |
| 145 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { | 146 void WindowManagerApplication::ScreenlockStateChanged(bool locked) { |
| 146 window_manager_->SetScreenLocked(locked); | 147 window_manager_->SetScreenLocked(locked); |
| 147 } | 148 } |
| 148 | 149 |
| 149 } // namespace mus | 150 } // namespace mus |
| 150 } // namespace ash | 151 } // namespace ash |
| OLD | NEW |