OLD | NEW |
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 "components/web_contents_delegate_android/web_contents_delegate_android
.h" | 5 #include "components/web_contents_delegate_android/web_contents_delegate_android
.h" |
6 | 6 |
7 #include <android/keycodes.h> | 7 #include <android/keycodes.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 JNIEnv* env = AttachCurrentThread(); | 143 JNIEnv* env = AttachCurrentThread(); |
144 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 144 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
145 if (obj.is_null()) | 145 if (obj.is_null()) |
146 return; | 146 return; |
147 Java_WebContentsDelegateAndroid_navigationStateChanged( | 147 Java_WebContentsDelegateAndroid_navigationStateChanged( |
148 env, | 148 env, |
149 obj.obj(), | 149 obj.obj(), |
150 changed_flags); | 150 changed_flags); |
151 } | 151 } |
152 | 152 |
153 void WebContentsDelegateAndroid::VisibleSSLStateChanged( | 153 void WebContentsDelegateAndroid::VisibleSSLStateChanged(WebContents* source) { |
154 const WebContents* source) { | |
155 JNIEnv* env = AttachCurrentThread(); | 154 JNIEnv* env = AttachCurrentThread(); |
156 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 155 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
157 if (obj.is_null()) | 156 if (obj.is_null()) |
158 return; | 157 return; |
159 Java_WebContentsDelegateAndroid_visibleSSLStateChanged( | 158 Java_WebContentsDelegateAndroid_visibleSSLStateChanged( |
160 env, | 159 env, |
161 obj.obj()); | 160 obj.obj()); |
162 } | 161 } |
163 | 162 |
164 void WebContentsDelegateAndroid::ActivateContents(WebContents* contents) { | 163 void WebContentsDelegateAndroid::ActivateContents(WebContents* contents) { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // Native JNI methods | 437 // Native JNI methods |
439 // ---------------------------------------------------------------------------- | 438 // ---------------------------------------------------------------------------- |
440 | 439 |
441 // Register native methods | 440 // Register native methods |
442 | 441 |
443 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 442 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
444 return RegisterNativesImpl(env); | 443 return RegisterNativesImpl(env); |
445 } | 444 } |
446 | 445 |
447 } // namespace web_contents_delegate_android | 446 } // namespace web_contents_delegate_android |
OLD | NEW |