OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/mus_app.h" | 5 #include "components/mus/mus_app.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "components/mus/gles2/gpu_impl.h" | 8 #include "components/mus/gles2/gpu_impl.h" |
9 #include "components/mus/public/cpp/args.h" | 9 #include "components/mus/public/cpp/args.h" |
10 #include "components/mus/surfaces/surfaces_scheduler.h" | 10 #include "components/mus/surfaces/surfaces_scheduler.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 event_source_ = ui::PlatformEventSource::CreateDefault(); | 64 event_source_ = ui::PlatformEventSource::CreateDefault(); |
65 #endif | 65 #endif |
66 | 66 |
67 if (!gpu_state_.get()) | 67 if (!gpu_state_.get()) |
68 gpu_state_ = new GpuState; | 68 gpu_state_ = new GpuState; |
69 connection_manager_.reset(new ConnectionManager(this, surfaces_state_)); | 69 connection_manager_.reset(new ConnectionManager(this, surfaces_state_)); |
70 } | 70 } |
71 | 71 |
72 bool MandolineUIServicesApp::ConfigureIncomingConnection( | 72 bool MandolineUIServicesApp::ConfigureIncomingConnection( |
73 ApplicationConnection* connection) { | 73 ApplicationConnection* connection) { |
74 // MandolineUIServices | |
75 connection->AddService<ViewTreeHostFactory>(this); | 74 connection->AddService<ViewTreeHostFactory>(this); |
76 // GPU | |
77 connection->AddService<Gpu>(this); | 75 connection->AddService<Gpu>(this); |
78 return true; | 76 return true; |
79 } | 77 } |
80 | 78 |
81 void MandolineUIServicesApp::OnNoMoreRootConnections() { | 79 void MandolineUIServicesApp::OnNoMoreRootConnections() { |
82 app_impl_->Quit(); | 80 app_impl_->Quit(); |
83 } | 81 } |
84 | 82 |
85 ClientConnection* MandolineUIServicesApp::CreateClientConnectionForEmbedAtView( | 83 ClientConnection* MandolineUIServicesApp::CreateClientConnectionForEmbedAtView( |
86 ConnectionManager* connection_manager, | 84 ConnectionManager* connection_manager, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 host_client.Pass(), connection_manager_.get(), app_impl_, | 134 host_client.Pass(), connection_manager_.get(), app_impl_, |
137 gpu_state_, surfaces_state_); | 135 gpu_state_, surfaces_state_); |
138 | 136 |
139 // ViewTreeHostConnection manages its own lifetime. | 137 // ViewTreeHostConnection manages its own lifetime. |
140 host_impl->Init(new ViewTreeHostConnectionImpl( | 138 host_impl->Init(new ViewTreeHostConnectionImpl( |
141 host.Pass(), make_scoped_ptr(host_impl), tree_client.Pass(), | 139 host.Pass(), make_scoped_ptr(host_impl), tree_client.Pass(), |
142 connection_manager_.get())); | 140 connection_manager_.get())); |
143 } | 141 } |
144 | 142 |
145 } // namespace mus | 143 } // namespace mus |
OLD | NEW |