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

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: Yaron's nits 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 {
17 public:
18 static SelectFileDialogImpl* Create(Listener* listener,
19 ui::SelectFilePolicy* policy);
20
21 void OnFileSelected(JNIEnv*, jobject, jstring filepath);
sky 2012/09/13 16:24:03 Why do these need to be public?
sky 2012/09/13 16:24:03 all method parameters should have names and the na
aurimas (slooooooooow) 2012/09/17 16:56:45 Done.
aurimas (slooooooooow) 2012/09/17 16:56:45 They have to be public so java could access them t
22 void OnFileNotSelected(JNIEnv*, jobject);
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,
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*);
42
43 protected:
44 virtual ~SelectFileDialogImpl();
45
46 private:
47 explicit SelectFileDialogImpl(Listener* listener,
sky 2012/09/13 16:24:04 no explicit and indentation is off.
aurimas (slooooooooow) 2012/09/14 00:06:59 Done.
48 ui::SelectFilePolicy* policy);
49
50 virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
51
52 base::android::ScopedJavaGlobalRef<jobject> java_object_;
53
54 bool is_running_;
sky 2012/09/13 16:24:04 add description.
55 };
sky 2012/09/13 16:24:04 DISALLOW_...
aurimas (slooooooooow) 2012/09/14 00:06:59 Done.
56
57 SelectFileDialog* CreateAndroidSelectFileDialog(
58 SelectFileDialog::Listener* listener,
59 SelectFilePolicy* policy);
60
61 } // namespace ui
62
63 #endif // UI_BASE_DIALOGS_ANDROID_SELECT_FILE_DIALOG_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698