Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / mandoline / app / android / mandoline_activity.cc
blobd57a4b20d1f5efe503f52891e83be289c7064d86
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
3 // found in the LICENSE file.
5 #include "base/android/jni_string.h"
6 #include "jni/MandolineActivity_jni.h"
7 #include "mandoline/ui/browser/public/interfaces/launch_handler.mojom.h"
8 #include "mojo/runner/android/main.h"
9 #include "mojo/runner/context.h"
11 namespace mandoline {
13 static void LaunchURL(JNIEnv* env, jclass clazz, jstring jurl) {
14 LaunchHandlerPtr launch_handler;
15 mojo::runner::GetContext()->application_manager()->ConnectToService(
16 GURL("mojo:browser"), &launch_handler);
17 launch_handler->LaunchURL(
18 base::android::ConvertJavaStringToUTF8(env, jurl));
21 bool RegisterMandolineActivity(JNIEnv* env) {
22 return RegisterNativesImpl(env);
25 } // namespace mandoline