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

Side by Side Diff: ppapi/cpp/file_system.cc

Issue 6899055: PPAPI: Force async callback invocation option. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/cpp/file_ref.cc ('k') | ppapi/cpp/graphics_2d.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) 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/cpp/file_system.h" 5 #include "ppapi/cpp/file_system.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_file_system.h" 8 #include "ppapi/c/ppb_file_system.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/file_ref.h" 10 #include "ppapi/cpp/file_ref.h"
(...skipping 14 matching lines...) Expand all
25 PP_FileSystemType type) { 25 PP_FileSystemType type) {
26 if (!has_interface<PPB_FileSystem>()) 26 if (!has_interface<PPB_FileSystem>())
27 return; 27 return;
28 PassRefFromConstructor(get_interface<PPB_FileSystem>()->Create( 28 PassRefFromConstructor(get_interface<PPB_FileSystem>()->Create(
29 instance->pp_instance(), type)); 29 instance->pp_instance(), type));
30 } 30 }
31 31
32 int32_t FileSystem::Open(int64_t expected_size, 32 int32_t FileSystem::Open(int64_t expected_size,
33 const CompletionCallback& cc) { 33 const CompletionCallback& cc) {
34 if (!has_interface<PPB_FileSystem>()) 34 if (!has_interface<PPB_FileSystem>())
35 return PP_ERROR_NOINTERFACE; 35 return cc.MayForce(PP_ERROR_NOINTERFACE);
36 return get_interface<PPB_FileSystem>()->Open( 36 return get_interface<PPB_FileSystem>()->Open(
37 pp_resource(), expected_size, cc.pp_completion_callback()); 37 pp_resource(), expected_size, cc.pp_completion_callback());
38 } 38 }
39 39
40 } // namespace pp 40 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/file_ref.cc ('k') | ppapi/cpp/graphics_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698