Include webrtc_logging_private.idl even when enable_webrtc=0
[chromium-blink-merge.git] / components / navigation_interception / navigation_params_android.cc
blob769450fa9d2816558f67aa50c4dfc6e7dee03ff8
1 // Copyright (c) 2013 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 "components/navigation_interception/navigation_params_android.h"
7 #include "base/android/jni_string.h"
8 #include "jni/NavigationParams_jni.h"
10 using base::android::ConvertUTF8ToJavaString;
12 namespace navigation_interception {
14 base::android::ScopedJavaLocalRef<jobject> CreateJavaNavigationParams(
15 JNIEnv* env,
16 const NavigationParams& params) {
17 ScopedJavaLocalRef<jstring> jstring_url =
18 ConvertUTF8ToJavaString(env, params.url().spec());
20 return Java_NavigationParams_create(env,
21 jstring_url.obj(),
22 params.is_post(),
23 params.has_user_gesture(),
24 params.transition_type(),
25 params.is_redirect());
28 // Register native methods.
30 bool RegisterNavigationParams(JNIEnv* env) {
31 return RegisterNativesImpl(env);
34 } // namespace navigation_interception