| 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 "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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 void TaskViewer::RemoveWindow(views::Widget* widget) { | 286 void TaskViewer::RemoveWindow(views::Widget* widget) { |
| 287 auto it = std::find(windows_.begin(), windows_.end(), widget); | 287 auto it = std::find(windows_.begin(), windows_.end(), widget); |
| 288 DCHECK(it != windows_.end()); | 288 DCHECK(it != windows_.end()); |
| 289 windows_.erase(it); | 289 windows_.erase(it); |
| 290 if (windows_.empty()) | 290 if (windows_.empty()) |
| 291 base::MessageLoop::current()->QuitWhenIdle(); | 291 base::MessageLoop::current()->QuitWhenIdle(); |
| 292 } | 292 } |
| 293 | 293 |
| 294 void TaskViewer::OnStart() { | 294 void TaskViewer::OnStart() { |
| 295 tracing_.Initialize(context()->connector(), context()->identity().name()); | |
| 296 | |
| 297 aura_init_ = base::MakeUnique<views::AuraInit>( | 295 aura_init_ = base::MakeUnique<views::AuraInit>( |
| 298 context()->connector(), context()->identity(), "views_mus_resources.pak", | 296 context()->connector(), context()->identity(), "views_mus_resources.pak", |
| 299 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); | 297 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); |
| 300 } | 298 } |
| 301 | 299 |
| 302 void TaskViewer::OnBindInterface( | 300 void TaskViewer::OnBindInterface( |
| 303 const service_manager::ServiceInfo& source_info, | 301 const service_manager::ServiceInfo& source_info, |
| 304 const std::string& interface_name, | 302 const std::string& interface_name, |
| 305 mojo::ScopedMessagePipeHandle interface_pipe) { | 303 mojo::ScopedMessagePipeHandle interface_pipe) { |
| 306 registry_.BindInterface(source_info.identity, interface_name, | 304 registry_.BindInterface(source_info.identity, interface_name, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 334 windows_.push_back(window); | 332 windows_.push_back(window); |
| 335 } | 333 } |
| 336 | 334 |
| 337 void TaskViewer::Create(const service_manager::Identity& remote_identity, | 335 void TaskViewer::Create(const service_manager::Identity& remote_identity, |
| 338 ::mash::mojom::LaunchableRequest request) { | 336 ::mash::mojom::LaunchableRequest request) { |
| 339 bindings_.AddBinding(this, std::move(request)); | 337 bindings_.AddBinding(this, std::move(request)); |
| 340 } | 338 } |
| 341 | 339 |
| 342 } // namespace task_viewer | 340 } // namespace task_viewer |
| 343 } // namespace main | 341 } // namespace main |
| OLD | NEW |