| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/worker_host/worker_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 net::URLRequestContext* url_request_context_; | 82 net::URLRequestContext* url_request_context_; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| 86 | 86 |
| 87 // Notifies RenderViewHost that one or more worker objects crashed. | 87 // Notifies RenderViewHost that one or more worker objects crashed. |
| 88 void WorkerCrashCallback(int render_process_unique_id, int render_view_id) { | 88 void WorkerCrashCallback(int render_process_unique_id, int render_view_id) { |
| 89 RenderViewHost* host = | 89 RenderViewHostImpl* host = |
| 90 RenderViewHost::FromID(render_process_unique_id, render_view_id); | 90 RenderViewHostImpl::FromID(render_process_unique_id, render_view_id); |
| 91 if (host) | 91 if (host) |
| 92 host->delegate()->WorkerCrashed(); | 92 host->GetDelegate()->WorkerCrashed(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 WorkerProcessHost::WorkerProcessHost(content::ResourceContext* resource_context) | 95 WorkerProcessHost::WorkerProcessHost(content::ResourceContext* resource_context) |
| 96 : resource_context_(resource_context) { | 96 : resource_context_(resource_context) { |
| 97 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 97 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 98 DCHECK(resource_context); | 98 DCHECK(resource_context); |
| 99 process_.reset( | 99 process_.reset( |
| 100 new BrowserChildProcessHostImpl(content::PROCESS_TYPE_WORKER, this)); | 100 new BrowserChildProcessHostImpl(content::PROCESS_TYPE_WORKER, this)); |
| 101 } | 101 } |
| 102 | 102 |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 } | 676 } |
| 677 } | 677 } |
| 678 return false; | 678 return false; |
| 679 } | 679 } |
| 680 | 680 |
| 681 WorkerProcessHost::WorkerInstance::FilterInfo | 681 WorkerProcessHost::WorkerInstance::FilterInfo |
| 682 WorkerProcessHost::WorkerInstance::GetFilter() const { | 682 WorkerProcessHost::WorkerInstance::GetFilter() const { |
| 683 DCHECK(NumFilters() == 1); | 683 DCHECK(NumFilters() == 1); |
| 684 return *filters_.begin(); | 684 return *filters_.begin(); |
| 685 } | 685 } |
| OLD | NEW |