OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/service_worker/embedded_worker_dispatcher.h" | 5 #include "content/renderer/service_worker/embedded_worker_dispatcher.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/child/child_process.h" | 10 #include "content/child/child_process.h" |
11 #include "content/child/scoped_child_process_reference.h" | 11 #include "content/child/scoped_child_process_reference.h" |
12 #include "content/child/thread_safe_sender.h" | 12 #include "content/child/thread_safe_sender.h" |
| 13 #include "content/child/worker_task_runner.h" |
13 #include "content/common/service_worker/embedded_worker_messages.h" | 14 #include "content/common/service_worker/embedded_worker_messages.h" |
14 #include "content/renderer/render_thread_impl.h" | 15 #include "content/renderer/render_thread_impl.h" |
15 #include "content/renderer/service_worker/embedded_worker_context_client.h" | 16 #include "content/renderer/service_worker/embedded_worker_context_client.h" |
16 #include "third_party/WebKit/public/platform/WebString.h" | 17 #include "third_party/WebKit/public/platform/WebString.h" |
17 #include "third_party/WebKit/public/platform/WebURL.h" | 18 #include "third_party/WebKit/public/platform/WebURL.h" |
18 #include "third_party/WebKit/public/web/WebEmbeddedWorker.h" | 19 #include "third_party/WebKit/public/web/WebEmbeddedWorker.h" |
19 #include "third_party/WebKit/public/web/WebEmbeddedWorkerStartData.h" | 20 #include "third_party/WebKit/public/web/WebEmbeddedWorkerStartData.h" |
20 #include "webkit/child/worker_task_runner.h" | |
21 #include "webkit/common/user_agent/user_agent.h" | 21 #include "webkit/common/user_agent/user_agent.h" |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 // A thin wrapper of WebEmbeddedWorker which also adds and releases process | 25 // A thin wrapper of WebEmbeddedWorker which also adds and releases process |
26 // references automatically. | 26 // references automatically. |
27 class EmbeddedWorkerDispatcher::WorkerWrapper { | 27 class EmbeddedWorkerDispatcher::WorkerWrapper { |
28 public: | 28 public: |
29 explicit WorkerWrapper(blink::WebEmbeddedWorker* worker) : worker_(worker) {} | 29 explicit WorkerWrapper(blink::WebEmbeddedWorker* worker) : worker_(worker) {} |
30 ~WorkerWrapper() {} | 30 ~WorkerWrapper() {} |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return; | 88 return; |
89 } | 89 } |
90 | 90 |
91 // This should eventually call WorkerContextDestroyed. (We may need to post | 91 // This should eventually call WorkerContextDestroyed. (We may need to post |
92 // a delayed task to forcibly abort the worker context if we find it | 92 // a delayed task to forcibly abort the worker context if we find it |
93 // necessary) | 93 // necessary) |
94 wrapper->worker()->terminateWorkerContext(); | 94 wrapper->worker()->terminateWorkerContext(); |
95 } | 95 } |
96 | 96 |
97 } // namespace content | 97 } // namespace content |
OLD | NEW |