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

Side by Side Diff: ui/base/dialogs/select_file_dialog_android.h

Issue 10916160: Upstreaming SelectFileDialog for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_BASE_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_
6 #define UI_BASE_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/file_path.h"
12 #include "ui/base/dialogs/select_file_dialog.h"
13
14 namespace ui {
15
16 class SelectFileDialogImpl : public ui::SelectFileDialog {
Ted C 2012/09/17 18:40:16 Hmm...the other platforms have the Impl definition
17 public:
18 static SelectFileDialogImpl* Create(Listener* listener,
sky 2012/09/17 20:53:44 wrap listener to next line so that it aligns with
aurimas (slooooooooow) 2012/09/17 22:20:48 Done.
19 ui::SelectFilePolicy* policy);
20
21 void OnFileSelected(JNIEnv* env, jobject javaObject, jstring filepath);
sky 2012/09/17 20:53:44 java_object
aurimas (slooooooooow) 2012/09/17 22:20:48 Done.
22 void OnFileNotSelected(JNIEnv* env, jobject javaObject);
sky 2012/09/17 20:53:44 java_object
aurimas (slooooooooow) 2012/09/17 22:20:48 Done.
23
24 // From SelectFileDialog
25 virtual bool IsRunning(gfx::NativeWindow) const OVERRIDE;
26 virtual void ListenerDestroyed() OVERRIDE;
27
28 // 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 // the capture value as the last element of the vector.
31 virtual void SelectFileImpl(
32 ui::SelectFileDialog::Type,
sky 2012/09/17 20:53:44 remember, all parameters need names.
aurimas (slooooooooow) 2012/09/17 22:20:48 Done.
33 const string16& title,
34 const FilePath& default_path,
35 const ui::SelectFileDialog::FileTypeInfo* file_types,
36 int file_type_index,
37 const std::string& default_extension,
38 gfx::NativeWindow owning_window,
39 void* params) OVERRIDE;
40
41 static bool RegisterSelectFileDialog(JNIEnv*);
sky 2012/09/17 20:53:44 parameter needs a name.
aurimas (slooooooooow) 2012/09/17 22:20:48 Done.
42
43 protected:
44 virtual ~SelectFileDialogImpl();
45
46 private:
47 SelectFileDialogImpl(Listener* listener, ui::SelectFilePolicy* policy);
48
49 virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
50
51 base::android::ScopedJavaGlobalRef<jobject> java_object_;
52
53 bool is_running_;
sky 2012/09/17 20:53:44 Add description.
aurimas (slooooooooow) 2012/09/17 22:20:48 Done.
54
55 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl);
56 };
57
58 SelectFileDialog* CreateAndroidSelectFileDialog(
59 SelectFileDialog::Listener* listener,
60 SelectFilePolicy* policy);
61
62 } // namespace ui
63
64 #endif // UI_BASE_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698