| 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/cpp/trusted/file_chooser_trusted.h" | 5 #include "ppapi/cpp/trusted/file_chooser_trusted.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_bool.h" | 7 #include "ppapi/c/pp_bool.h" |
| 8 #include "ppapi/cpp/completion_callback.h" | 8 #include "ppapi/cpp/completion_callback.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 return PPB_FILECHOOSER_TRUSTED_INTERFACE_0_6; | 23 return PPB_FILECHOOSER_TRUSTED_INTERFACE_0_6; |
| 24 } | 24 } |
| 25 | 25 |
| 26 } // namespace | 26 } // namespace |
| 27 | 27 |
| 28 FileChooser_Trusted::FileChooser_Trusted() : save_as_(false) { | 28 FileChooser_Trusted::FileChooser_Trusted() : save_as_(false) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 FileChooser_Trusted::FileChooser_Trusted(const InstanceHandle& instance, | 31 FileChooser_Trusted::FileChooser_Trusted(const InstanceHandle& instance, |
| 32 PP_FileChooserMode_Dev mode, | 32 PP_FileChooserMode_Dev mode, |
| 33 const Var& accept_mime_types, | 33 const Var& accept_types, |
| 34 bool save_as, | 34 bool save_as, |
| 35 const std::string& suggested_file_name) | 35 const std::string& suggested_file_name) |
| 36 : FileChooser_Dev(instance, mode, accept_mime_types), | 36 : FileChooser_Dev(instance, mode, accept_types), |
| 37 save_as_(save_as), | 37 save_as_(save_as), |
| 38 suggested_file_name_(suggested_file_name) { | 38 suggested_file_name_(suggested_file_name) { |
| 39 } | 39 } |
| 40 | 40 |
| 41 FileChooser_Trusted::FileChooser_Trusted(const FileChooser_Trusted& other) | 41 FileChooser_Trusted::FileChooser_Trusted(const FileChooser_Trusted& other) |
| 42 : FileChooser_Dev(other), | 42 : FileChooser_Dev(other), |
| 43 save_as_(other.save_as_), | 43 save_as_(other.save_as_), |
| 44 suggested_file_name_(other.suggested_file_name_) { | 44 suggested_file_name_(other.suggested_file_name_) { |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 72 return get_interface<PPB_FileChooserTrusted_0_5>()->ShowWithoutUserGesture( | 72 return get_interface<PPB_FileChooserTrusted_0_5>()->ShowWithoutUserGesture( |
| 73 pp_resource(), | 73 pp_resource(), |
| 74 PP_FromBool(save_as_), | 74 PP_FromBool(save_as_), |
| 75 Var(suggested_file_name_).pp_var(), | 75 Var(suggested_file_name_).pp_var(), |
| 76 PP_MakeCompletionCallback(&CallbackConverter, data)); | 76 PP_MakeCompletionCallback(&CallbackConverter, data)); |
| 77 } | 77 } |
| 78 return callback.MayForce(PP_ERROR_NOINTERFACE); | 78 return callback.MayForce(PP_ERROR_NOINTERFACE); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace pp | 81 } // namespace pp |
| OLD | NEW |