OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/proxy/ppb_flash_file_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_file_proxy.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (g_module_local_thread_adapter->OnModuleLocalMessageReceived(message)) { | 181 if (g_module_local_thread_adapter->OnModuleLocalMessageReceived(message)) { |
182 // The message was consumed, this means we can remove the message ID from | 182 // The message was consumed, this means we can remove the message ID from |
183 // the list of messages this channel is waiting on. | 183 // the list of messages this channel is waiting on. |
184 pending_requests_for_filter_.erase(IPC::SyncMessage::GetMessageId(message)); | 184 pending_requests_for_filter_.erase(IPC::SyncMessage::GetMessageId(message)); |
185 return true; | 185 return true; |
186 } | 186 } |
187 return false; | 187 return false; |
188 } | 188 } |
189 | 189 |
190 ModuleLocalThreadAdapter::ModuleLocalThreadAdapter() | 190 ModuleLocalThreadAdapter::ModuleLocalThreadAdapter() |
191 : main_thread_(base::MessageLoopProxy::CreateForCurrentThread()) { | 191 : main_thread_(base::MessageLoopProxy::current()) { |
192 } | 192 } |
193 | 193 |
194 void ModuleLocalThreadAdapter::AddInstanceRouting(PP_Instance instance, | 194 void ModuleLocalThreadAdapter::AddInstanceRouting(PP_Instance instance, |
195 Dispatcher* dispatcher) { | 195 Dispatcher* dispatcher) { |
196 base::AutoLock lock(lock_); | 196 base::AutoLock lock(lock_); |
197 | 197 |
198 // Now that we've had contact with a dispatcher, we can set up the IO thread. | 198 // Now that we've had contact with a dispatcher, we can set up the IO thread. |
199 DCHECK(main_thread_->BelongsToCurrentThread()); | 199 DCHECK(main_thread_->BelongsToCurrentThread()); |
200 if (!io_thread_.get()) | 200 if (!io_thread_.get()) |
201 io_thread_ = dispatcher->GetIPCMessageLoop(); | 201 io_thread_ = dispatcher->GetIPCMessageLoop(); |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 void PPB_Flash_File_FileRef_Proxy::OnMsgQueryFile( | 723 void PPB_Flash_File_FileRef_Proxy::OnMsgQueryFile( |
724 const HostResource& host_resource, | 724 const HostResource& host_resource, |
725 PP_FileInfo* info, | 725 PP_FileInfo* info, |
726 int32_t* result) { | 726 int32_t* result) { |
727 *result = ppb_flash_file_module_local_target()-> | 727 *result = ppb_flash_file_module_local_target()-> |
728 QueryFile(host_resource.host_resource(), info); | 728 QueryFile(host_resource.host_resource(), info); |
729 } | 729 } |
730 | 730 |
731 } // namespace proxy | 731 } // namespace proxy |
732 } // namespace pp | 732 } // namespace pp |
OLD | NEW |