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

Side by Side Diff: mash/task_viewer/task_viewer.cc

Issue 2471033005: Adds DesktopWindowTreeHostMus (Closed)
Patch Set: fix Created 4 years, 1 month 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 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 "mash/task_viewer/task_viewer.h" 5 #include "mash/task_viewer/task_viewer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 auto it = std::find(windows_.begin(), windows_.end(), widget); 283 auto it = std::find(windows_.begin(), windows_.end(), widget);
284 DCHECK(it != windows_.end()); 284 DCHECK(it != windows_.end());
285 windows_.erase(it); 285 windows_.erase(it);
286 if (windows_.empty()) 286 if (windows_.empty())
287 base::MessageLoop::current()->QuitWhenIdle(); 287 base::MessageLoop::current()->QuitWhenIdle();
288 } 288 }
289 289
290 void TaskViewer::OnStart(const service_manager::ServiceInfo& info) { 290 void TaskViewer::OnStart(const service_manager::ServiceInfo& info) {
291 tracing_.Initialize(connector(), info.identity.name()); 291 tracing_.Initialize(connector(), info.identity.name());
292 292
293 aura_init_.reset( 293 aura_init_ = base::MakeUnique<views::AuraInit>(connector(), info.identity,
294 new views::AuraInit(connector(), "views_mus_resources.pak")); 294 "views_mus_resources.pak");
295 window_manager_connection_ = 295 window_manager_connection_ =
296 views::WindowManagerConnection::Create(connector(), info.identity); 296 views::WindowManagerConnection::Create(connector(), info.identity);
297 } 297 }
298 298
299 bool TaskViewer::OnConnect(const service_manager::ServiceInfo& remote_info, 299 bool TaskViewer::OnConnect(const service_manager::ServiceInfo& remote_info,
300 service_manager::InterfaceRegistry* registry) { 300 service_manager::InterfaceRegistry* registry) {
301 registry->AddInterface<mojom::Launchable>(this); 301 registry->AddInterface<mojom::Launchable>(this);
302 return true; 302 return true;
303 } 303 }
304 304
(...skipping 24 matching lines...) Expand all
329 windows_.push_back(window); 329 windows_.push_back(window);
330 } 330 }
331 331
332 void TaskViewer::Create(const service_manager::Identity& remote_identity, 332 void TaskViewer::Create(const service_manager::Identity& remote_identity,
333 mojom::LaunchableRequest request) { 333 mojom::LaunchableRequest request) {
334 bindings_.AddBinding(this, std::move(request)); 334 bindings_.AddBinding(this, std::move(request));
335 } 335 }
336 336
337 } // namespace task_viewer 337 } // namespace task_viewer
338 } // namespace main 338 } // namespace main
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698