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

Side by Side Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « android_webview/native/aw_settings.cc ('k') | android_webview/native/cookie_manager.cc » ('j') | 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 "android_webview/native/aw_web_contents_delegate.h" 5 #include "android_webview/native/aw_web_contents_delegate.h"
6 6
7 #include "android_webview/browser/aw_javascript_dialog_manager.h" 7 #include "android_webview/browser/aw_javascript_dialog_manager.h"
8 #include "android_webview/browser/find_helper.h" 8 #include "android_webview/browser/find_helper.h"
9 #include "android_webview/native/aw_contents.h" 9 #include "android_webview/native/aw_contents.h"
10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 WebContentsDelegateAndroid::ExitFullscreenModeForTab(web_contents); 245 WebContentsDelegateAndroid::ExitFullscreenModeForTab(web_contents);
246 is_fullscreen_ = false; 246 is_fullscreen_ = false;
247 web_contents->GetRenderViewHost()->WasResized(); 247 web_contents->GetRenderViewHost()->WasResized();
248 } 248 }
249 249
250 bool AwWebContentsDelegate::IsFullscreenForTabOrPending( 250 bool AwWebContentsDelegate::IsFullscreenForTabOrPending(
251 const content::WebContents* web_contents) const { 251 const content::WebContents* web_contents) const {
252 return is_fullscreen_; 252 return is_fullscreen_;
253 } 253 }
254 254
255
256 static void FilesSelectedInChooser( 255 static void FilesSelectedInChooser(
257 JNIEnv* env, jclass clazz, 256 JNIEnv* env,
258 jint process_id, jint render_id, jint mode_flags, 257 const JavaParamRef<jclass>& clazz,
259 jobjectArray file_paths, jobjectArray display_names) { 258 jint process_id,
259 jint render_id,
260 jint mode_flags,
261 const JavaParamRef<jobjectArray>& file_paths,
262 const JavaParamRef<jobjectArray>& display_names) {
260 content::RenderViewHost* rvh = content::RenderViewHost::FromID(process_id, 263 content::RenderViewHost* rvh = content::RenderViewHost::FromID(process_id,
261 render_id); 264 render_id);
262 if (!rvh) 265 if (!rvh)
263 return; 266 return;
264 267
265 std::vector<std::string> file_path_str; 268 std::vector<std::string> file_path_str;
266 std::vector<std::string> display_name_str; 269 std::vector<std::string> display_name_str;
267 // Note file_paths maybe NULL, but this will just yield a zero-length vector. 270 // Note file_paths maybe NULL, but this will just yield a zero-length vector.
268 base::android::AppendJavaStringArrayToStringVector(env, file_paths, 271 base::android::AppendJavaStringArrayToStringVector(env, file_paths,
269 &file_path_str); 272 &file_path_str);
(...skipping 26 matching lines...) Expand all
296 DVLOG(0) << "File Chooser result: mode = " << mode 299 DVLOG(0) << "File Chooser result: mode = " << mode
297 << ", file paths = " << base::JoinString(file_path_str, ":"); 300 << ", file paths = " << base::JoinString(file_path_str, ":");
298 rvh->FilesSelectedInChooser(files, mode); 301 rvh->FilesSelectedInChooser(files, mode);
299 } 302 }
300 303
301 bool RegisterAwWebContentsDelegate(JNIEnv* env) { 304 bool RegisterAwWebContentsDelegate(JNIEnv* env) {
302 return RegisterNativesImpl(env); 305 return RegisterNativesImpl(env);
303 } 306 }
304 307
305 } // namespace android_webview 308 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_settings.cc ('k') | android_webview/native/cookie_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698