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: mandoline/app/android/mandoline_activity.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/android/jni_string.h" 5 #include "base/android/jni_string.h"
6 #include "jni/MandolineActivity_jni.h" 6 #include "jni/MandolineActivity_jni.h"
7 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h" 7 #include "mandoline/ui/desktop_ui/public/interfaces/launch_handler.mojom.h"
8 #include "mojo/runner/android/main.h" 8 #include "mojo/runner/android/main.h"
9 #include "mojo/runner/context.h" 9 #include "mojo/runner/context.h"
10 10
11 namespace mandoline { 11 namespace mandoline {
12 12
13 static void LaunchURL(JNIEnv* env, jclass clazz, jstring jurl) { 13 static void LaunchURL(JNIEnv* env,
14 const JavaParamRef<jclass>& clazz,
15 const JavaParamRef<jstring>& jurl) {
14 LaunchHandlerPtr launch_handler; 16 LaunchHandlerPtr launch_handler;
15 mojo::runner::GetContext()->application_manager()->ConnectToService( 17 mojo::runner::GetContext()->application_manager()->ConnectToService(
16 GURL("mojo:phone_ui"), &launch_handler); 18 GURL("mojo:phone_ui"), &launch_handler);
17 launch_handler->LaunchURL( 19 launch_handler->LaunchURL(
18 base::android::ConvertJavaStringToUTF8(env, jurl)); 20 base::android::ConvertJavaStringToUTF8(env, jurl));
19 } 21 }
20 22
21 bool RegisterMandolineActivity(JNIEnv* env) { 23 bool RegisterMandolineActivity(JNIEnv* env) {
22 return RegisterNativesImpl(env); 24 return RegisterNativesImpl(env);
23 } 25 }
24 26
25 } // namespace mandoline 27 } // namespace mandoline
OLDNEW
« no previous file with comments | « content/shell/browser/shell_mojo_test_utils_android.cc ('k') | mojo/android/javatests/mojo_test_case.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698