| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 uint32_t pid) override { | 179 uint32_t pid) override { |
| 180 for (auto it = instances_.begin(); it != instances_.end(); ++it) { | 180 for (auto it = instances_.begin(); it != instances_.end(); ++it) { |
| 181 if ((*it)->identity == identity) { | 181 if ((*it)->identity == identity) { |
| 182 (*it)->pid = pid; | 182 (*it)->pid = pid; |
| 183 observer_->OnItemsChanged( | 183 observer_->OnItemsChanged( |
| 184 static_cast<int>(it - instances_.begin()), 1); | 184 static_cast<int>(it - instances_.begin()), 1); |
| 185 return; | 185 return; |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 void OnServiceFailedToStart( |
| 190 const service_manager::Identity& identity) override { |
| 191 } |
| 189 void OnServiceStopped(const service_manager::Identity& identity) override { | 192 void OnServiceStopped(const service_manager::Identity& identity) override { |
| 190 for (auto it = instances_.begin(); it != instances_.end(); ++it) { | 193 for (auto it = instances_.begin(); it != instances_.end(); ++it) { |
| 191 if ((*it)->identity == identity) { | 194 if ((*it)->identity == identity) { |
| 192 observer_->OnItemsRemoved( | 195 observer_->OnItemsRemoved( |
| 193 static_cast<int>(it - instances_.begin()), 1); | 196 static_cast<int>(it - instances_.begin()), 1); |
| 194 instances_.erase(it); | 197 instances_.erase(it); |
| 195 return; | 198 return; |
| 196 } | 199 } |
| 197 } | 200 } |
| 198 NOTREACHED(); | 201 NOTREACHED(); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 windows_.push_back(window); | 329 windows_.push_back(window); |
| 327 } | 330 } |
| 328 | 331 |
| 329 void TaskViewer::Create(const service_manager::Identity& remote_identity, | 332 void TaskViewer::Create(const service_manager::Identity& remote_identity, |
| 330 mojom::LaunchableRequest request) { | 333 mojom::LaunchableRequest request) { |
| 331 bindings_.AddBinding(this, std::move(request)); | 334 bindings_.AddBinding(this, std::move(request)); |
| 332 } | 335 } |
| 333 | 336 |
| 334 } // namespace task_viewer | 337 } // namespace task_viewer |
| 335 } // namespace main | 338 } // namespace main |
| OLD | NEW |