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

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

Issue 2440903002: Make "all user" services work when packaged. (Closed)
Patch Set: Addressed latest comments and synced. 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
« no previous file with comments | « chrome/test/base/mash_browser_tests_manifest.json ('k') | services/catalog/entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/test/base/mash_browser_tests_manifest.json ('k') | services/catalog/entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698