| 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, jobject java_object, jstring filepath); | 21 void OnFileSelected(JNIEnv* env, |
| 22 jobject java_object, |
| 23 jstring filepath, |
| 24 jstring display_name); |
| 22 void OnFileNotSelected(JNIEnv* env, jobject java_object); | 25 void OnFileNotSelected(JNIEnv* env, jobject java_object); |
| 23 | 26 |
| 24 // From SelectFileDialog | 27 // From SelectFileDialog |
| 25 virtual bool IsRunning(gfx::NativeWindow) const OVERRIDE; | 28 virtual bool IsRunning(gfx::NativeWindow) const OVERRIDE; |
| 26 virtual void ListenerDestroyed() OVERRIDE; | 29 virtual void ListenerDestroyed() OVERRIDE; |
| 27 | 30 |
| 28 // Called when it is time to display the file picker. | 31 // Called when it is time to display the file picker. |
| 29 // params is expected to be a vector<string16> with accept_types first and | 32 // params is expected to be a vector<string16> with accept_types first and |
| 30 // the capture value as the last element of the vector. | 33 // the capture value as the last element of the vector. |
| 31 virtual void SelectFileImpl( | 34 virtual void SelectFileImpl( |
| (...skipping 25 matching lines...) Expand all Loading... |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 SelectFileDialog* CreateAndroidSelectFileDialog( | 62 SelectFileDialog* CreateAndroidSelectFileDialog( |
| 60 SelectFileDialog::Listener* listener, | 63 SelectFileDialog::Listener* listener, |
| 61 SelectFilePolicy* policy); | 64 SelectFilePolicy* policy); |
| 62 | 65 |
| 63 } // namespace ui | 66 } // namespace ui |
| 64 | 67 |
| 65 #endif // UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ | 68 #endif // UI_SHELL_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_ |
| 66 | 69 |
| OLD | NEW |