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

Side by Side Diff: ppapi/thunk/ppb_url_loader_api.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 years, 6 months 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/thunk/ppb_udp_socket_private_thunk.cc ('k') | ppapi/thunk/ppb_url_loader_thunk.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) 2011 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 #ifndef PPAPI_THUNK_URL_LOADER_API_H_ 5 #ifndef PPAPI_THUNK_URL_LOADER_API_H_
6 #define PPAPI_THUNK_URL_LOADER_API_H_ 6 #define PPAPI_THUNK_URL_LOADER_API_H_
7 7
8 #include "base/memory/ref_counted.h"
8 #include "ppapi/c/ppb_url_loader.h" 9 #include "ppapi/c/ppb_url_loader.h"
9 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" 10 #include "ppapi/c/trusted/ppb_url_loader_trusted.h"
10 11
11 namespace ppapi { 12 namespace ppapi {
13
14 class TrackedCallback;
15
12 namespace thunk { 16 namespace thunk {
13 17
14 class PPB_URLLoader_API { 18 class PPB_URLLoader_API {
15 public: 19 public:
16 virtual ~PPB_URLLoader_API() {} 20 virtual ~PPB_URLLoader_API() {}
17 21
18 virtual int32_t Open(PP_Resource request_id, 22 virtual int32_t Open(PP_Resource request_id,
19 PP_CompletionCallback callback) = 0; 23 scoped_refptr<TrackedCallback> callback) = 0;
20 virtual int32_t FollowRedirect(PP_CompletionCallback callback) = 0; 24 virtual int32_t FollowRedirect(scoped_refptr<TrackedCallback> callback) = 0;
21 virtual PP_Bool GetUploadProgress(int64_t* bytes_sent, 25 virtual PP_Bool GetUploadProgress(int64_t* bytes_sent,
22 int64_t* total_bytes_to_be_sent) = 0; 26 int64_t* total_bytes_to_be_sent) = 0;
23 virtual PP_Bool GetDownloadProgress(int64_t* bytes_received, 27 virtual PP_Bool GetDownloadProgress(int64_t* bytes_received,
24 int64_t* total_bytes_to_be_received) = 0; 28 int64_t* total_bytes_to_be_received) = 0;
25 virtual PP_Resource GetResponseInfo() = 0; 29 virtual PP_Resource GetResponseInfo() = 0;
26 virtual int32_t ReadResponseBody(void* buffer, 30 virtual int32_t ReadResponseBody(void* buffer,
27 int32_t bytes_to_read, 31 int32_t bytes_to_read,
28 PP_CompletionCallback callback) = 0; 32 scoped_refptr<TrackedCallback> callback) = 0;
29 virtual int32_t FinishStreamingToFile(PP_CompletionCallback callback) = 0; 33 virtual int32_t FinishStreamingToFile(
34 scoped_refptr<TrackedCallback> callback) = 0;
30 virtual void Close() = 0; 35 virtual void Close() = 0;
31 36
32 // Trusted API. 37 // Trusted API.
33 virtual void GrantUniversalAccess() = 0; 38 virtual void GrantUniversalAccess() = 0;
34 virtual void SetStatusCallback(PP_URLLoaderTrusted_StatusCallback cb) = 0; 39 virtual void SetStatusCallback(PP_URLLoaderTrusted_StatusCallback cb) = 0;
35 }; 40 };
36 41
37 } // namespace thunk 42 } // namespace thunk
38 } // namespace ppapi 43 } // namespace ppapi
39 44
40 #endif // PPAPI_THUNK_URL_LOADER_API_H_ 45 #endif // PPAPI_THUNK_URL_LOADER_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_udp_socket_private_thunk.cc ('k') | ppapi/thunk/ppb_url_loader_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698