OLD | NEW |
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> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "content/browser/devtools/embedded_worker_devtools_manager.h" | 14 #include "content/browser/devtools/embedded_worker_devtools_manager.h" |
15 #include "content/browser/renderer_host/render_process_host_impl.h" | 15 #include "content/browser/renderer_host/render_process_host_impl.h" |
16 #include "content/browser/shared_worker/shared_worker_host.h" | 16 #include "content/browser/shared_worker/shared_worker_host.h" |
17 #include "content/browser/shared_worker/shared_worker_instance.h" | 17 #include "content/browser/shared_worker/shared_worker_instance.h" |
18 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 18 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
19 #include "content/browser/worker_host/worker_document_set.h" | 19 #include "content/browser/shared_worker/worker_document_set.h" |
20 #include "content/common/view_messages.h" | 20 #include "content/common/view_messages.h" |
21 #include "content/common/worker_messages.h" | 21 #include "content/common/worker_messages.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/worker_service_observer.h" | 23 #include "content/public/browser/worker_service_observer.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
| 26 |
| 27 WorkerService* WorkerService::GetInstance() { |
| 28 return SharedWorkerServiceImpl::GetInstance(); |
| 29 } |
| 30 |
26 namespace { | 31 namespace { |
27 | 32 |
28 class ScopedWorkerDependencyChecker { | 33 class ScopedWorkerDependencyChecker { |
29 public: | 34 public: |
30 explicit ScopedWorkerDependencyChecker(SharedWorkerServiceImpl* service) | 35 explicit ScopedWorkerDependencyChecker(SharedWorkerServiceImpl* service) |
31 : service_(service) {} | 36 : service_(service) {} |
32 ScopedWorkerDependencyChecker(SharedWorkerServiceImpl* service, | 37 ScopedWorkerDependencyChecker(SharedWorkerServiceImpl* service, |
33 base::Closure done_closure) | 38 base::Closure done_closure) |
34 : service_(service), done_closure_(done_closure) {} | 39 : service_(service), done_closure_(done_closure) {} |
35 ~ScopedWorkerDependencyChecker() { | 40 ~ScopedWorkerDependencyChecker() { |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 UpdateWorkerDependencyFunc new_func) { | 657 UpdateWorkerDependencyFunc new_func) { |
653 update_worker_dependency_ = new_func; | 658 update_worker_dependency_ = new_func; |
654 } | 659 } |
655 | 660 |
656 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( | 661 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( |
657 bool (*new_func)(int)) { | 662 bool (*new_func)(int)) { |
658 s_try_increment_worker_ref_count_ = new_func; | 663 s_try_increment_worker_ref_count_ = new_func; |
659 } | 664 } |
660 | 665 |
661 } // namespace content | 666 } // namespace content |
OLD | NEW |