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

Side by Side Diff: services/ui/service.cc

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Wrap comment Created 4 years 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 "services/ui/service.h" 5 #include "services/ui/service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 platform_screen_->AddInterfaces(registry); 223 platform_screen_->AddInterfaces(registry);
224 224
225 #if defined(USE_OZONE) 225 #if defined(USE_OZONE)
226 ui::OzonePlatform::GetInstance()->AddInterfaces(registry); 226 ui::OzonePlatform::GetInstance()->AddInterfaces(registry);
227 #endif 227 #endif
228 228
229 return true; 229 return true;
230 } 230 }
231 231
232 void Service::StartDisplayInit() { 232 void Service::StartDisplayInit(bool window_manager_connected) {
233 platform_screen_->Init(window_server_->display_manager()); 233 platform_screen_->Init(window_server_->display_manager(),
234 window_manager_connected
235 ? display::PlatformScreen::WINDOW_MODE_INTERNAL
236 : display::PlatformScreen::WINDOW_MODE_EXTERNAL);
234 } 237 }
235 238
236 void Service::OnFirstDisplayReady() { 239 void Service::OnFirstDisplayReady() {
237 PendingRequests requests; 240 PendingRequests requests;
238 requests.swap(pending_requests_); 241 requests.swap(pending_requests_);
239 for (auto& request : requests) { 242 for (auto& request : requests) {
240 if (request->wtf_request) 243 if (request->wtf_request)
241 Create(request->remote_identity, std::move(*request->wtf_request)); 244 Create(request->remote_identity, std::move(*request->wtf_request));
242 else 245 else
243 Create(request->remote_identity, std::move(*request->dm_request)); 246 Create(request->remote_identity, std::move(*request->dm_request));
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 mojom::WindowServerTestRequest request) { 366 mojom::WindowServerTestRequest request) {
364 if (!test_config_) 367 if (!test_config_)
365 return; 368 return;
366 mojo::MakeStrongBinding( 369 mojo::MakeStrongBinding(
367 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), 370 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()),
368 std::move(request)); 371 std::move(request));
369 } 372 }
370 373
371 374
372 } // namespace ui 375 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698