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 #include "content/browser/shared_worker/shared_worker_service_impl.h" | 5 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
6 | 6 |
| 7 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
7 #include "content/common/worker_messages.h" | 8 #include "content/common/worker_messages.h" |
8 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
9 #include "content/public/browser/worker_service_observer.h" | 10 #include "content/public/browser/worker_service_observer.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 SharedWorkerServiceImpl* SharedWorkerServiceImpl::GetInstance() { | 14 SharedWorkerServiceImpl* SharedWorkerServiceImpl::GetInstance() { |
14 // TODO(horo): implement this. | |
15 NOTIMPLEMENTED(); | |
16 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 15 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
17 return Singleton<SharedWorkerServiceImpl>::get(); | 16 return Singleton<SharedWorkerServiceImpl>::get(); |
18 } | 17 } |
19 | 18 |
20 SharedWorkerServiceImpl::SharedWorkerServiceImpl() { | 19 SharedWorkerServiceImpl::SharedWorkerServiceImpl() { |
21 // TODO(horo): implement this. | |
22 } | 20 } |
23 | 21 |
24 SharedWorkerServiceImpl::~SharedWorkerServiceImpl() { | 22 SharedWorkerServiceImpl::~SharedWorkerServiceImpl() { |
25 // TODO(horo): implement this. | |
26 } | 23 } |
27 | 24 |
28 | |
29 bool SharedWorkerServiceImpl::TerminateWorker(int process_id, int route_id) { | 25 bool SharedWorkerServiceImpl::TerminateWorker(int process_id, int route_id) { |
30 // TODO(horo): implement this. | 26 // TODO(horo): implement this. |
31 return false; | 27 return false; |
32 } | 28 } |
33 | 29 |
34 std::vector<WorkerService::WorkerInfo> SharedWorkerServiceImpl::GetWorkers() { | 30 std::vector<WorkerService::WorkerInfo> SharedWorkerServiceImpl::GetWorkers() { |
35 // TODO(horo): implement this. | 31 // TODO(horo): implement this. |
36 std::vector<WorkerService::WorkerInfo> results; | 32 std::vector<WorkerService::WorkerInfo> results; |
37 return results; | 33 return results; |
38 } | 34 } |
39 | 35 |
40 void SharedWorkerServiceImpl::AddObserver(WorkerServiceObserver* observer) { | 36 void SharedWorkerServiceImpl::AddObserver(WorkerServiceObserver* observer) { |
41 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
42 observers_.AddObserver(observer); | 38 observers_.AddObserver(observer); |
43 } | 39 } |
44 | 40 |
45 void SharedWorkerServiceImpl::RemoveObserver(WorkerServiceObserver* observer) { | 41 void SharedWorkerServiceImpl::RemoveObserver(WorkerServiceObserver* observer) { |
46 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
47 observers_.RemoveObserver(observer); | 43 observers_.RemoveObserver(observer); |
48 } | 44 } |
49 | 45 |
| 46 void SharedWorkerServiceImpl::CreateWorker( |
| 47 const ViewHostMsg_CreateWorker_Params& params, |
| 48 int route_id, |
| 49 SharedWorkerMessageFilter* filter, |
| 50 ResourceContext* resource_context, |
| 51 const WorkerStoragePartition& partition, |
| 52 bool* url_mismatch) { |
| 53 // TODO(horo): implement this. |
| 54 NOTIMPLEMENTED(); |
| 55 } |
| 56 |
| 57 void SharedWorkerServiceImpl::ForwardToWorker( |
| 58 const IPC::Message& message, |
| 59 SharedWorkerMessageFilter* filter) { |
| 60 // TODO(horo): implement this. |
| 61 NOTIMPLEMENTED(); |
| 62 } |
| 63 |
| 64 void SharedWorkerServiceImpl::DocumentDetached( |
| 65 unsigned long long document_id, |
| 66 SharedWorkerMessageFilter* filter) { |
| 67 // TODO(horo): implement this. |
| 68 NOTIMPLEMENTED(); |
| 69 } |
| 70 |
| 71 void SharedWorkerServiceImpl::WorkerContextClosed( |
| 72 int worker_route_id, |
| 73 SharedWorkerMessageFilter* filter) { |
| 74 // TODO(horo): implement this. |
| 75 NOTIMPLEMENTED(); |
| 76 } |
| 77 |
| 78 void SharedWorkerServiceImpl::WorkerContextDestroyed( |
| 79 int worker_route_id, |
| 80 SharedWorkerMessageFilter* filter) { |
| 81 // TODO(horo): implement this. |
| 82 NOTIMPLEMENTED(); |
| 83 } |
| 84 |
| 85 void SharedWorkerServiceImpl::WorkerScriptLoaded( |
| 86 int worker_route_id, |
| 87 SharedWorkerMessageFilter* filter) { |
| 88 // TODO(horo): implement this. |
| 89 NOTIMPLEMENTED(); |
| 90 } |
| 91 |
| 92 void SharedWorkerServiceImpl::WorkerScriptLoadFailed( |
| 93 int worker_route_id, |
| 94 SharedWorkerMessageFilter* filter) { |
| 95 // TODO(horo): implement this. |
| 96 NOTIMPLEMENTED(); |
| 97 } |
| 98 |
| 99 void SharedWorkerServiceImpl::WorkerConnected( |
| 100 int message_port_id, |
| 101 int worker_route_id, |
| 102 SharedWorkerMessageFilter* filter) { |
| 103 // TODO(horo): implement this. |
| 104 NOTIMPLEMENTED(); |
| 105 } |
| 106 |
| 107 void SharedWorkerServiceImpl::AllowDatabase( |
| 108 int worker_route_id, |
| 109 const GURL& url, |
| 110 const base::string16& name, |
| 111 const base::string16& display_name, |
| 112 unsigned long estimated_size, |
| 113 bool* result, |
| 114 SharedWorkerMessageFilter* filter) { |
| 115 // TODO(horo): implement this. |
| 116 NOTIMPLEMENTED(); |
| 117 } |
| 118 |
| 119 void SharedWorkerServiceImpl::AllowFileSystem( |
| 120 int worker_route_id, |
| 121 const GURL& url, |
| 122 bool* result, |
| 123 SharedWorkerMessageFilter* filter) { |
| 124 // TODO(horo): implement this. |
| 125 NOTIMPLEMENTED(); |
| 126 } |
| 127 |
| 128 void SharedWorkerServiceImpl::AllowIndexedDB( |
| 129 int worker_route_id, |
| 130 const GURL& url, |
| 131 const base::string16& name, |
| 132 bool* result, |
| 133 SharedWorkerMessageFilter* filter) { |
| 134 // TODO(horo): implement this. |
| 135 NOTIMPLEMENTED(); |
| 136 } |
| 137 |
| 138 void SharedWorkerServiceImpl::OnSharedWorkerMessageFilterClosing( |
| 139 SharedWorkerMessageFilter* filter) { |
| 140 // TODO(horo): implement this. |
| 141 NOTIMPLEMENTED(); |
| 142 } |
| 143 |
50 } // namespace content | 144 } // namespace content |
OLD | NEW |