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