| 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_message_filter.h" | 5 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
| 6 | 6 |
| 7 #include "content/browser/devtools/worker_devtools_manager.h" | 7 #include "content/browser/devtools/worker_devtools_manager.h" |
| 8 #include "content/browser/message_port_message_filter.h" | 8 #include "content/browser/message_port_message_filter.h" |
| 9 #include "content/browser/shared_worker/shared_worker_service_impl.h" | 9 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
| 10 #include "content/common/devtools_messages.h" | 10 #include "content/common/devtools_messages.h" |
| 11 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
| 12 #include "content/common/worker_messages.h" | 12 #include "content/common/worker_messages.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 namespace { | |
| 16 const uint32 kFilteredMessageClasses[] = { | |
| 17 ViewMsgStart, | |
| 18 WorkerMsgStart, | |
| 19 }; | |
| 20 } // namespace | |
| 21 | 15 |
| 22 SharedWorkerMessageFilter::SharedWorkerMessageFilter( | 16 SharedWorkerMessageFilter::SharedWorkerMessageFilter( |
| 23 int render_process_id, | 17 int render_process_id, |
| 24 ResourceContext* resource_context, | 18 ResourceContext* resource_context, |
| 25 const WorkerStoragePartition& partition, | 19 const WorkerStoragePartition& partition, |
| 26 MessagePortMessageFilter* message_port_message_filter) | 20 MessagePortMessageFilter* message_port_message_filter) |
| 27 : BrowserMessageFilter( | 21 : render_process_id_(render_process_id), |
| 28 kFilteredMessageClasses, arraysize(kFilteredMessageClasses)), | |
| 29 render_process_id_(render_process_id), | |
| 30 resource_context_(resource_context), | 22 resource_context_(resource_context), |
| 31 partition_(partition), | 23 partition_(partition), |
| 32 message_port_message_filter_(message_port_message_filter) { | 24 message_port_message_filter_(message_port_message_filter) { |
| 33 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 34 } | 26 } |
| 35 | 27 |
| 36 SharedWorkerMessageFilter::~SharedWorkerMessageFilter() { | 28 SharedWorkerMessageFilter::~SharedWorkerMessageFilter() { |
| 37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 38 } | 30 } |
| 39 | 31 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 const base::string16& name, | 146 const base::string16& name, |
| 155 bool* result) { | 147 bool* result) { |
| 156 SharedWorkerServiceImpl::GetInstance()->AllowIndexedDB(worker_route_id, | 148 SharedWorkerServiceImpl::GetInstance()->AllowIndexedDB(worker_route_id, |
| 157 url, | 149 url, |
| 158 name, | 150 name, |
| 159 result, | 151 result, |
| 160 this); | 152 this); |
| 161 } | 153 } |
| 162 | 154 |
| 163 } // namespace content | 155 } // namespace content |
| OLD | NEW |