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

Side by Side Diff: ppapi/cpp/dev/file_chooser_dev.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/dev/directory_reader_dev.cc ('k') | ppapi/cpp/dev/file_io_dev.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) 2010 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/dev/file_chooser_dev.h" 5 #include "ppapi/cpp/dev/file_chooser_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_file_chooser_dev.h" 7 #include "ppapi/c/dev/ppb_file_chooser_dev.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/dev/file_ref_dev.h" 10 #include "ppapi/cpp/dev/file_ref_dev.h"
11 #include "ppapi/cpp/instance.h" 11 #include "ppapi/cpp/instance.h"
(...skipping 17 matching lines...) Expand all
29 PassRefFromConstructor(get_interface<PPB_FileChooser_Dev>()->Create( 29 PassRefFromConstructor(get_interface<PPB_FileChooser_Dev>()->Create(
30 instance.pp_instance(), &options)); 30 instance.pp_instance(), &options));
31 } 31 }
32 32
33 FileChooser_Dev::FileChooser_Dev(const FileChooser_Dev& other) 33 FileChooser_Dev::FileChooser_Dev(const FileChooser_Dev& other)
34 : Resource(other) { 34 : Resource(other) {
35 } 35 }
36 36
37 int32_t FileChooser_Dev::Show(const CompletionCallback& cc) { 37 int32_t FileChooser_Dev::Show(const CompletionCallback& cc) {
38 if (!has_interface<PPB_FileChooser_Dev>()) 38 if (!has_interface<PPB_FileChooser_Dev>())
39 return PP_ERROR_NOINTERFACE; 39 return cc.MayForce(PP_ERROR_NOINTERFACE);
40 return get_interface<PPB_FileChooser_Dev>()->Show( 40 return get_interface<PPB_FileChooser_Dev>()->Show(
41 pp_resource(), cc.pp_completion_callback()); 41 pp_resource(), cc.pp_completion_callback());
42 } 42 }
43 43
44 FileRef_Dev FileChooser_Dev::GetNextChosenFile() const { 44 FileRef_Dev FileChooser_Dev::GetNextChosenFile() const {
45 if (!has_interface<PPB_FileChooser_Dev>()) 45 if (!has_interface<PPB_FileChooser_Dev>())
46 return FileRef_Dev(); 46 return FileRef_Dev();
47 return FileRef_Dev(FileRef_Dev::PassRef(), 47 return FileRef_Dev(FileRef_Dev::PassRef(),
48 get_interface<PPB_FileChooser_Dev>()->GetNextChosenFile(pp_resource())); 48 get_interface<PPB_FileChooser_Dev>()->GetNextChosenFile(pp_resource()));
49 } 49 }
50 50
51 } // namespace pp 51 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/directory_reader_dev.cc ('k') | ppapi/cpp/dev/file_io_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698