| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_file_system_proxy.h" | 5 #include "ppapi/proxy/ppb_file_system_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/ppb_file_system.h" | 10 #include "ppapi/c/ppb_file_system.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 new PpapiHostMsg_PPBFileSystem_Open( | 87 new PpapiHostMsg_PPBFileSystem_Open( |
| 88 API_ID_PPB_FILE_SYSTEM, host_resource(), expected_size)); | 88 API_ID_PPB_FILE_SYSTEM, host_resource(), expected_size)); |
| 89 return PP_OK_COMPLETIONPENDING; | 89 return PP_OK_COMPLETIONPENDING; |
| 90 } | 90 } |
| 91 | 91 |
| 92 PP_FileSystemType FileSystem::GetType() { | 92 PP_FileSystemType FileSystem::GetType() { |
| 93 return type_; | 93 return type_; |
| 94 } | 94 } |
| 95 | 95 |
| 96 void FileSystem::OpenComplete(int32_t result) { | 96 void FileSystem::OpenComplete(int32_t result) { |
| 97 TrackedCallback::ClearAndRun(¤t_open_callback_, result); | 97 current_open_callback_->Run(result); |
| 98 } | 98 } |
| 99 | 99 |
| 100 PPB_FileSystem_Proxy::PPB_FileSystem_Proxy(Dispatcher* dispatcher) | 100 PPB_FileSystem_Proxy::PPB_FileSystem_Proxy(Dispatcher* dispatcher) |
| 101 : InterfaceProxy(dispatcher), | 101 : InterfaceProxy(dispatcher), |
| 102 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 102 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 103 } | 103 } |
| 104 | 104 |
| 105 PPB_FileSystem_Proxy::~PPB_FileSystem_Proxy() { | 105 PPB_FileSystem_Proxy::~PPB_FileSystem_Proxy() { |
| 106 } | 106 } |
| 107 | 107 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 void PPB_FileSystem_Proxy::OpenCompleteInHost( | 176 void PPB_FileSystem_Proxy::OpenCompleteInHost( |
| 177 int32_t result, | 177 int32_t result, |
| 178 const HostResource& host_resource) { | 178 const HostResource& host_resource) { |
| 179 dispatcher()->Send(new PpapiMsg_PPBFileSystem_OpenComplete( | 179 dispatcher()->Send(new PpapiMsg_PPBFileSystem_OpenComplete( |
| 180 API_ID_PPB_FILE_SYSTEM, host_resource, result)); | 180 API_ID_PPB_FILE_SYSTEM, host_resource, result)); |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace proxy | 183 } // namespace proxy |
| 184 } // namespace ppapi | 184 } // namespace ppapi |
| OLD | NEW |