| 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" | |
| 8 #include "content/common/worker_messages.h" | 7 #include "content/common/worker_messages.h" |
| 9 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 10 #include "content/public/browser/worker_service_observer.h" | 9 #include "content/public/browser/worker_service_observer.h" |
| 11 | 10 |
| 12 namespace content { | 11 namespace content { |
| 13 | 12 |
| 14 SharedWorkerServiceImpl* SharedWorkerServiceImpl::GetInstance() { | 13 SharedWorkerServiceImpl* SharedWorkerServiceImpl::GetInstance() { |
| 14 // TODO(horo): implement this. |
| 15 NOTIMPLEMENTED(); |
| 15 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 16 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 16 return Singleton<SharedWorkerServiceImpl>::get(); | 17 return Singleton<SharedWorkerServiceImpl>::get(); |
| 17 } | 18 } |
| 18 | 19 |
| 19 SharedWorkerServiceImpl::SharedWorkerServiceImpl() { | 20 SharedWorkerServiceImpl::SharedWorkerServiceImpl() { |
| 21 // TODO(horo): implement this. |
| 20 } | 22 } |
| 21 | 23 |
| 22 SharedWorkerServiceImpl::~SharedWorkerServiceImpl() { | 24 SharedWorkerServiceImpl::~SharedWorkerServiceImpl() { |
| 25 // TODO(horo): implement this. |
| 23 } | 26 } |
| 24 | 27 |
| 28 |
| 25 bool SharedWorkerServiceImpl::TerminateWorker(int process_id, int route_id) { | 29 bool SharedWorkerServiceImpl::TerminateWorker(int process_id, int route_id) { |
| 26 // TODO(horo): implement this. | 30 // TODO(horo): implement this. |
| 27 return false; | 31 return false; |
| 28 } | 32 } |
| 29 | 33 |
| 30 std::vector<WorkerService::WorkerInfo> SharedWorkerServiceImpl::GetWorkers() { | 34 std::vector<WorkerService::WorkerInfo> SharedWorkerServiceImpl::GetWorkers() { |
| 31 // TODO(horo): implement this. | 35 // TODO(horo): implement this. |
| 32 std::vector<WorkerService::WorkerInfo> results; | 36 std::vector<WorkerService::WorkerInfo> results; |
| 33 return results; | 37 return results; |
| 34 } | 38 } |
| 35 | 39 |
| 36 void SharedWorkerServiceImpl::AddObserver(WorkerServiceObserver* observer) { | 40 void SharedWorkerServiceImpl::AddObserver(WorkerServiceObserver* observer) { |
| 37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 41 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 38 observers_.AddObserver(observer); | 42 observers_.AddObserver(observer); |
| 39 } | 43 } |
| 40 | 44 |
| 41 void SharedWorkerServiceImpl::RemoveObserver(WorkerServiceObserver* observer) { | 45 void SharedWorkerServiceImpl::RemoveObserver(WorkerServiceObserver* observer) { |
| 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 46 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 43 observers_.RemoveObserver(observer); | 47 observers_.RemoveObserver(observer); |
| 44 } | 48 } |
| 45 | 49 |
| 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 | |
| 144 } // namespace content | 50 } // namespace content |
| OLD | NEW |