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/mus/accelerator_registrar_impl.h" | 9 #include "ash/mus/accelerator_registrar_impl.h" |
10 #include "ash/mus/root_window_controller.h" | 10 #include "ash/mus/root_window_controller.h" |
11 #include "ash/mus/root_windows_observer.h" | 11 #include "ash/mus/root_windows_observer.h" |
12 #include "ash/mus/shelf_layout_impl.h" | 12 #include "ash/mus/shelf_layout_impl.h" |
13 #include "ash/mus/user_window_controller_impl.h" | 13 #include "ash/mus/user_window_controller_impl.h" |
14 #include "ash/mus/window_manager.h" | 14 #include "ash/mus/window_manager.h" |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
17 #include "components/mus/common/event_matcher_util.h" | 17 #include "components/mus/common/event_matcher_util.h" |
| 18 #include "components/mus/common/gpu_service.h" |
18 #include "components/mus/public/cpp/window.h" | 19 #include "components/mus/public/cpp/window.h" |
19 #include "components/mus/public/cpp/window_tree_client.h" | 20 #include "components/mus/public/cpp/window_tree_client.h" |
20 #include "services/shell/public/cpp/connection.h" | 21 #include "services/shell/public/cpp/connection.h" |
21 #include "services/shell/public/cpp/connector.h" | 22 #include "services/shell/public/cpp/connector.h" |
22 #include "services/tracing/public/cpp/tracing_impl.h" | 23 #include "services/tracing/public/cpp/tracing_impl.h" |
23 #include "ui/events/event.h" | 24 #include "ui/events/event.h" |
24 #include "ui/views/mus/aura_init.h" | 25 #include "ui/views/mus/aura_init.h" |
25 | 26 |
26 namespace ash { | 27 namespace ash { |
27 namespace mus { | 28 namespace mus { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void WindowManagerApplication::InitWindowManager( | 61 void WindowManagerApplication::InitWindowManager( |
61 ::mus::WindowTreeClient* window_tree_client) { | 62 ::mus::WindowTreeClient* window_tree_client) { |
62 window_manager_->Init(window_tree_client); | 63 window_manager_->Init(window_tree_client); |
63 window_manager_->AddRootWindowsObserver(this); | 64 window_manager_->AddRootWindowsObserver(this); |
64 } | 65 } |
65 | 66 |
66 void WindowManagerApplication::Initialize(shell::Connector* connector, | 67 void WindowManagerApplication::Initialize(shell::Connector* connector, |
67 const shell::Identity& identity, | 68 const shell::Identity& identity, |
68 uint32_t id) { | 69 uint32_t id) { |
69 connector_ = connector; | 70 connector_ = connector; |
| 71 ::mus::GpuService::Initialize(connector); |
70 window_manager_.reset(new WindowManager(this, connector_)); | 72 window_manager_.reset(new WindowManager(this, connector_)); |
71 | 73 |
72 aura_init_.reset(new views::AuraInit(connector_, "ash_mus_resources.pak")); | 74 aura_init_.reset(new views::AuraInit(connector_, "ash_mus_resources.pak")); |
73 | 75 |
74 tracing_.Initialize(connector, identity.name()); | 76 tracing_.Initialize(connector, identity.name()); |
75 | 77 |
76 ::mus::WindowTreeClient* window_tree_client = new ::mus::WindowTreeClient( | 78 ::mus::WindowTreeClient* window_tree_client = new ::mus::WindowTreeClient( |
77 window_manager_.get(), window_manager_.get(), nullptr); | 79 window_manager_.get(), window_manager_.get(), nullptr); |
78 window_tree_client->ConnectAsWindowManager(connector); | 80 window_tree_client->ConnectAsWindowManager(connector); |
79 | 81 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 RootWindowController* controller) { | 171 RootWindowController* controller) { |
170 // TODO(msw): this isn't right, ownership should belong in WindowManager | 172 // TODO(msw): this isn't right, ownership should belong in WindowManager |
171 // and/or RootWindowController. But this is temporary until we get rid of | 173 // and/or RootWindowController. But this is temporary until we get rid of |
172 // sysui. | 174 // sysui. |
173 shelf_layout_.reset(); | 175 shelf_layout_.reset(); |
174 user_window_controller_.reset(); | 176 user_window_controller_.reset(); |
175 } | 177 } |
176 | 178 |
177 } // namespace mus | 179 } // namespace mus |
178 } // namespace ash | 180 } // namespace ash |
OLD | NEW |