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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.cc

Issue 196503005: Make DevTools support for the embedded SharedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce SharedWorkerDevToolsManager Created 6 years, 9 months 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 "content/browser/shared_worker/shared_worker_service_impl.h" 5 #include "content/browser/shared_worker/shared_worker_service_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 iter != worker_hosts_.end(); 284 iter != worker_hosts_.end();
285 ++iter) { 285 ++iter) {
286 iter->second->FilterShutdown(filter); 286 iter->second->FilterShutdown(filter);
287 if (iter->first.first == filter->render_process_id()) 287 if (iter->first.first == filter->render_process_id())
288 remove_list.push_back(iter->first); 288 remove_list.push_back(iter->first);
289 } 289 }
290 for (size_t i = 0; i < remove_list.size(); ++i) 290 for (size_t i = 0; i < remove_list.size(); ++i)
291 worker_hosts_.erase(remove_list[i]); 291 worker_hosts_.erase(remove_list[i]);
292 } 292 }
293 293
294 void SharedWorkerServiceImpl::NotifyWorkerDestroyed(int worker_process_id,
295 int worker_route_id) {
296 FOR_EACH_OBSERVER(WorkerServiceObserver,
297 observers_,
298 WorkerDestroyed(worker_process_id, worker_route_id));
299 }
300
294 SharedWorkerHost* SharedWorkerServiceImpl::FindSharedWorkerHost( 301 SharedWorkerHost* SharedWorkerServiceImpl::FindSharedWorkerHost(
295 SharedWorkerMessageFilter* filter, 302 SharedWorkerMessageFilter* filter,
296 int worker_route_id) { 303 int worker_route_id) {
297 return worker_hosts_.get(std::make_pair(filter->render_process_id(), 304 return worker_hosts_.get(std::make_pair(filter->render_process_id(),
298 worker_route_id)); 305 worker_route_id));
299 } 306 }
300 307
301 SharedWorkerInstance* SharedWorkerServiceImpl::FindSharedWorkerInstance( 308 SharedWorkerInstance* SharedWorkerServiceImpl::FindSharedWorkerInstance(
302 const GURL& url, 309 const GURL& url,
303 const base::string16& name, 310 const base::string16& name,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 update_worker_dependency_(added_items, removed_items); 358 update_worker_dependency_(added_items, removed_items);
352 } 359 }
353 } 360 }
354 361
355 void SharedWorkerServiceImpl::ChangeUpdateWorkerDependencyFuncForTesting( 362 void SharedWorkerServiceImpl::ChangeUpdateWorkerDependencyFuncForTesting(
356 UpdateWorkerDependencyFunc new_func) { 363 UpdateWorkerDependencyFunc new_func) {
357 update_worker_dependency_ = new_func; 364 update_worker_dependency_ = new_func;
358 } 365 }
359 366
360 } // namespace content 367 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698