Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: components/mus/mus_app.cc

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/mus/example/wm/window_manager_impl.cc ('k') | components/mus/public/interfaces/window_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698