| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void WorkerContextClosed(); | 57 void WorkerContextClosed(); |
| 58 void WorkerScriptLoaded(); | 58 void WorkerScriptLoaded(); |
| 59 void WorkerScriptLoadFailed(); | 59 void WorkerScriptLoadFailed(); |
| 60 void WorkerConnected(int message_port_id); | 60 void WorkerConnected(int message_port_id); |
| 61 void WorkerContextDestroyed(); | 61 void WorkerContextDestroyed(); |
| 62 void AllowDatabase(const GURL& url, | 62 void AllowDatabase(const GURL& url, |
| 63 const base::string16& name, | 63 const base::string16& name, |
| 64 const base::string16& display_name, | 64 const base::string16& display_name, |
| 65 unsigned long estimated_size, | 65 unsigned long estimated_size, |
| 66 bool* result); | 66 bool* result); |
| 67 void AllowFileSystem(const GURL& url, bool* result); | 67 void RequestFileSystemAccessSync(const GURL& url, IPC::Message* reply_msg); |
| 68 void AllowIndexedDB(const GURL& url, | 68 void AllowIndexedDB(const GURL& url, |
| 69 const base::string16& name, | 69 const base::string16& name, |
| 70 bool* result); | 70 bool* result); |
| 71 | 71 |
| 72 // Terminates the given worker, i.e. based on a UI action. | 72 // Terminates the given worker, i.e. based on a UI action. |
| 73 void TerminateWorker(); | 73 void TerminateWorker(); |
| 74 | 74 |
| 75 void AddFilter(SharedWorkerMessageFilter* filter, int route_id); | 75 void AddFilter(SharedWorkerMessageFilter* filter, int route_id); |
| 76 | 76 |
| 77 SharedWorkerInstance* instance() { return instance_.get(); } | 77 SharedWorkerInstance* instance() { return instance_.get(); } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 SharedWorkerMessageFilter* incoming_filter); | 111 SharedWorkerMessageFilter* incoming_filter); |
| 112 | 112 |
| 113 // Return a vector of all the render process/render frame IDs. | 113 // Return a vector of all the render process/render frame IDs. |
| 114 std::vector<std::pair<int, int> > GetRenderFrameIDsForWorker(); | 114 std::vector<std::pair<int, int> > GetRenderFrameIDsForWorker(); |
| 115 | 115 |
| 116 void RemoveFilters(SharedWorkerMessageFilter* filter); | 116 void RemoveFilters(SharedWorkerMessageFilter* filter); |
| 117 bool HasFilter(SharedWorkerMessageFilter* filter, int route_id) const; | 117 bool HasFilter(SharedWorkerMessageFilter* filter, int route_id) const; |
| 118 void SetMessagePortID(SharedWorkerMessageFilter* filter, | 118 void SetMessagePortID(SharedWorkerMessageFilter* filter, |
| 119 int route_id, | 119 int route_id, |
| 120 int message_port_id); | 120 int message_port_id); |
| 121 | 121 void RequestFileSystemAccessSyncResponse(IPC::Message* reply_msg, |
| 122 bool allowed); |
| 122 scoped_ptr<SharedWorkerInstance> instance_; | 123 scoped_ptr<SharedWorkerInstance> instance_; |
| 123 scoped_refptr<WorkerDocumentSet> worker_document_set_; | 124 scoped_refptr<WorkerDocumentSet> worker_document_set_; |
| 124 FilterList filters_; | 125 FilterList filters_; |
| 125 SharedWorkerMessageFilter* container_render_filter_; | 126 SharedWorkerMessageFilter* container_render_filter_; |
| 126 int worker_process_id_; | 127 int worker_process_id_; |
| 127 int worker_route_id_; | 128 int worker_route_id_; |
| 128 bool load_failed_; | 129 bool load_failed_; |
| 129 bool closed_; | 130 bool closed_; |
| 130 const base::TimeTicks creation_time_; | 131 const base::TimeTicks creation_time_; |
| 131 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); | 132 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); |
| 132 }; | 133 }; |
| 133 } // namespace content | 134 } // namespace content |
| 134 | 135 |
| 135 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ | 136 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ |
| OLD | NEW |