| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 net::URLRequestContext* url_request_context_; | 81 net::URLRequestContext* url_request_context_; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace | 84 } // namespace |
| 85 | 85 |
| 86 // Notifies RenderViewHost that one or more worker objects crashed. | 86 // Notifies RenderViewHost that one or more worker objects crashed. |
| 87 void WorkerCrashCallback(int render_process_unique_id, int render_view_id) { | 87 void WorkerCrashCallback(int render_process_unique_id, int render_view_id) { |
| 88 RenderViewHost* host = | 88 RenderViewHostImpl* host = |
| 89 RenderViewHost::FromID(render_process_unique_id, render_view_id); | 89 RenderViewHostImpl::FromID(render_process_unique_id, render_view_id); |
| 90 if (host) | 90 if (host) |
| 91 host->delegate()->WorkerCrashed(); | 91 host->GetDelegate()->WorkerCrashed(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 WorkerProcessHost::WorkerProcessHost(content::ResourceContext* resource_context) | 94 WorkerProcessHost::WorkerProcessHost(content::ResourceContext* resource_context) |
| 95 : resource_context_(resource_context) { | 95 : resource_context_(resource_context) { |
| 96 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 96 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 97 DCHECK(resource_context); | 97 DCHECK(resource_context); |
| 98 process_.reset( | 98 process_.reset( |
| 99 new BrowserChildProcessHostImpl(content::PROCESS_TYPE_WORKER, this)); | 99 new BrowserChildProcessHostImpl(content::PROCESS_TYPE_WORKER, this)); |
| 100 } | 100 } |
| 101 | 101 |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 } | 674 } |
| 675 } | 675 } |
| 676 return false; | 676 return false; |
| 677 } | 677 } |
| 678 | 678 |
| 679 WorkerProcessHost::WorkerInstance::FilterInfo | 679 WorkerProcessHost::WorkerInstance::FilterInfo |
| 680 WorkerProcessHost::WorkerInstance::GetFilter() const { | 680 WorkerProcessHost::WorkerInstance::GetFilter() const { |
| 681 DCHECK(NumFilters() == 1); | 681 DCHECK(NumFilters() == 1); |
| 682 return *filters_.begin(); | 682 return *filters_.begin(); |
| 683 } | 683 } |
| OLD | NEW |