OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ | 5 #ifndef UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ |
6 #define UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ | 6 #define UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "ui/shell_dialogs/select_file_dialog.h" | 12 #include "ui/shell_dialogs/select_file_dialog.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 class SelectFileDialogImpl : public SelectFileDialog { | 16 class SelectFileDialogImpl : public SelectFileDialog { |
17 public: | 17 public: |
18 static SelectFileDialogImpl* Create(Listener* listener, | 18 static SelectFileDialogImpl* Create(Listener* listener, |
19 SelectFilePolicy* policy); | 19 SelectFilePolicy* policy); |
20 | 20 |
21 void OnFileSelected(JNIEnv* env, | 21 void OnFileSelected(JNIEnv* env, |
22 jobject java_object, | 22 jobject java_object, |
23 jstring filepath, | 23 jstring filepath, |
24 jstring display_name); | 24 jstring display_name); |
| 25 |
| 26 void OnMultipleFilesSelected(JNIEnv* env, |
| 27 jobject java_object, |
| 28 jobjectArray filepaths, |
| 29 jobjectArray display_names); |
| 30 |
25 void OnFileNotSelected(JNIEnv* env, jobject java_object); | 31 void OnFileNotSelected(JNIEnv* env, jobject java_object); |
26 | 32 |
27 // From SelectFileDialog | 33 // From SelectFileDialog |
28 virtual bool IsRunning(gfx::NativeWindow) const OVERRIDE; | 34 virtual bool IsRunning(gfx::NativeWindow) const OVERRIDE; |
29 virtual void ListenerDestroyed() OVERRIDE; | 35 virtual void ListenerDestroyed() OVERRIDE; |
30 | 36 |
31 // Called when it is time to display the file picker. | 37 // Called when it is time to display the file picker. |
32 // params is expected to be a vector<string16> with accept_types first and | 38 // params is expected to be a vector<string16> with accept_types first and |
33 // the capture value as the last element of the vector. | 39 // the capture value as the last element of the vector. |
34 virtual void SelectFileImpl( | 40 virtual void SelectFileImpl( |
(...skipping 22 matching lines...) Expand all Loading... |
57 }; | 63 }; |
58 | 64 |
59 SelectFileDialog* CreateAndroidSelectFileDialog( | 65 SelectFileDialog* CreateAndroidSelectFileDialog( |
60 SelectFileDialog::Listener* listener, | 66 SelectFileDialog::Listener* listener, |
61 SelectFilePolicy* policy); | 67 SelectFilePolicy* policy); |
62 | 68 |
63 } // namespace ui | 69 } // namespace ui |
64 | 70 |
65 #endif // UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ | 71 #endif // UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ |
66 | 72 |
OLD | NEW |