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

Side by Side Diff: ui/shell_dialogs/select_file_dialog_android.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 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
« no previous file with comments | « ui/platform_window/android/platform_window_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "select_file_dialog_android.h" 5 #include "select_file_dialog_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 false); 113 false);
114 114
115 if (params) 115 if (params)
116 accept_types = *(reinterpret_cast<AcceptTypes*>(params)); 116 accept_types = *(reinterpret_cast<AcceptTypes*>(params));
117 117
118 ScopedJavaLocalRef<jobjectArray> accept_types_java = 118 ScopedJavaLocalRef<jobjectArray> accept_types_java =
119 base::android::ToJavaArrayOfStrings(env, accept_types.first); 119 base::android::ToJavaArrayOfStrings(env, accept_types.first);
120 120
121 bool accept_multiple_files = SelectFileDialog::SELECT_OPEN_MULTI_FILE == type; 121 bool accept_multiple_files = SelectFileDialog::SELECT_OPEN_MULTI_FILE == type;
122 122
123 Java_SelectFileDialog_selectFile(env, java_object_.obj(), 123 Java_SelectFileDialog_selectFile(env, java_object_, accept_types_java,
124 accept_types_java.obj(), 124 accept_types.second, accept_multiple_files,
125 accept_types.second, 125 owning_window->GetJavaObject());
126 accept_multiple_files,
127 owning_window->GetJavaObject().obj());
128 } 126 }
129 127
130 bool SelectFileDialogImpl::RegisterSelectFileDialog(JNIEnv* env) { 128 bool SelectFileDialogImpl::RegisterSelectFileDialog(JNIEnv* env) {
131 return RegisterNativesImpl(env); 129 return RegisterNativesImpl(env);
132 } 130 }
133 131
134 SelectFileDialogImpl::~SelectFileDialogImpl() { 132 SelectFileDialogImpl::~SelectFileDialogImpl() {
135 } 133 }
136 134
137 SelectFileDialogImpl::SelectFileDialogImpl(Listener* listener, 135 SelectFileDialogImpl::SelectFileDialogImpl(Listener* listener,
138 SelectFilePolicy* policy) 136 SelectFilePolicy* policy)
139 : SelectFileDialog(listener, policy) { 137 : SelectFileDialog(listener, policy) {
140 JNIEnv* env = base::android::AttachCurrentThread(); 138 JNIEnv* env = base::android::AttachCurrentThread();
141 java_object_.Reset( 139 java_object_.Reset(
142 Java_SelectFileDialog_create(env, reinterpret_cast<intptr_t>(this))); 140 Java_SelectFileDialog_create(env, reinterpret_cast<intptr_t>(this)));
143 } 141 }
144 142
145 bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() { 143 bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() {
146 NOTIMPLEMENTED(); 144 NOTIMPLEMENTED();
147 return false; 145 return false;
148 } 146 }
149 147
150 SelectFileDialog* CreateSelectFileDialog(SelectFileDialog::Listener* listener, 148 SelectFileDialog* CreateSelectFileDialog(SelectFileDialog::Listener* listener,
151 SelectFilePolicy* policy) { 149 SelectFilePolicy* policy) {
152 return SelectFileDialogImpl::Create(listener, policy); 150 return SelectFileDialogImpl::Create(listener, policy);
153 } 151 }
154 152
155 } // namespace ui 153 } // namespace ui
OLDNEW
« no previous file with comments | « ui/platform_window/android/platform_window_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698