Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: ppapi/proxy/ppb_file_system_proxy.cc

Issue 10909244: PPAPI: Get TrackedCallback ready for running on non-main threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_broker_proxy.cc ('k') | ppapi/proxy/ppb_flash_menu_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(&current_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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_broker_proxy.cc ('k') | ppapi/proxy/ppb_flash_menu_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698