| 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 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ | 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Handles the shutdown of the filter. If the worker has no other client, | 49 // Handles the shutdown of the filter. If the worker has no other client, |
| 50 // sends TerminateWorkerContext message to shut it down. | 50 // sends TerminateWorkerContext message to shut it down. |
| 51 void FilterShutdown(SharedWorkerMessageFilter* filter); | 51 void FilterShutdown(SharedWorkerMessageFilter* filter); |
| 52 | 52 |
| 53 // Shuts down any shared workers that are no longer referenced by active | 53 // Shuts down any shared workers that are no longer referenced by active |
| 54 // documents. | 54 // documents. |
| 55 void DocumentDetached(SharedWorkerMessageFilter* filter, | 55 void DocumentDetached(SharedWorkerMessageFilter* filter, |
| 56 unsigned long long document_id); | 56 unsigned long long document_id); |
| 57 | 57 |
| 58 void AcceptLanguageChanged(const base::string16& languages); |
| 58 void WorkerContextClosed(); | 59 void WorkerContextClosed(); |
| 59 void WorkerReadyForInspection(); | 60 void WorkerReadyForInspection(); |
| 60 void WorkerScriptLoaded(); | 61 void WorkerScriptLoaded(); |
| 61 void WorkerScriptLoadFailed(); | 62 void WorkerScriptLoadFailed(); |
| 62 void WorkerConnected(int message_port_id); | 63 void WorkerConnected(int message_port_id); |
| 63 void WorkerContextDestroyed(); | 64 void WorkerContextDestroyed(); |
| 64 void AllowDatabase(const GURL& url, | 65 void AllowDatabase(const GURL& url, |
| 65 const base::string16& name, | 66 const base::string16& name, |
| 66 const base::string16& display_name, | 67 const base::string16& display_name, |
| 67 unsigned long estimated_size, | 68 unsigned long estimated_size, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Return a vector of all the render process/render frame IDs. | 116 // Return a vector of all the render process/render frame IDs. |
| 116 std::vector<std::pair<int, int> > GetRenderFrameIDsForWorker(); | 117 std::vector<std::pair<int, int> > GetRenderFrameIDsForWorker(); |
| 117 | 118 |
| 118 void RemoveFilters(SharedWorkerMessageFilter* filter); | 119 void RemoveFilters(SharedWorkerMessageFilter* filter); |
| 119 bool HasFilter(SharedWorkerMessageFilter* filter, int route_id) const; | 120 bool HasFilter(SharedWorkerMessageFilter* filter, int route_id) const; |
| 120 void SetMessagePortID(SharedWorkerMessageFilter* filter, | 121 void SetMessagePortID(SharedWorkerMessageFilter* filter, |
| 121 int route_id, | 122 int route_id, |
| 122 int message_port_id); | 123 int message_port_id); |
| 123 void AllowFileSystemResponse(scoped_ptr<IPC::Message> reply_msg, | 124 void AllowFileSystemResponse(scoped_ptr<IPC::Message> reply_msg, |
| 124 bool allowed); | 125 bool allowed); |
| 126 |
| 125 scoped_ptr<SharedWorkerInstance> instance_; | 127 scoped_ptr<SharedWorkerInstance> instance_; |
| 126 scoped_refptr<WorkerDocumentSet> worker_document_set_; | 128 scoped_refptr<WorkerDocumentSet> worker_document_set_; |
| 127 FilterList filters_; | 129 FilterList filters_; |
| 128 SharedWorkerMessageFilter* container_render_filter_; | 130 SharedWorkerMessageFilter* container_render_filter_; |
| 129 int worker_process_id_; | 131 int worker_process_id_; |
| 130 int worker_route_id_; | 132 int worker_route_id_; |
| 131 bool load_failed_; | 133 bool load_failed_; |
| 132 bool closed_; | 134 bool closed_; |
| 133 const base::TimeTicks creation_time_; | 135 const base::TimeTicks creation_time_; |
| 134 | 136 |
| 135 base::WeakPtrFactory<SharedWorkerHost> weak_factory_; | 137 base::WeakPtrFactory<SharedWorkerHost> weak_factory_; |
| 136 | 138 |
| 137 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); | 139 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); |
| 138 }; | 140 }; |
| 139 } // namespace content | 141 } // namespace content |
| 140 | 142 |
| 141 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ | 143 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
| OLD | NEW |