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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 JNIEnv* env = AttachCurrentThread(); | 144 JNIEnv* env = AttachCurrentThread(); |
145 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 145 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
146 if (obj.is_null()) | 146 if (obj.is_null()) |
147 return; | 147 return; |
148 Java_WebContentsDelegateAndroid_navigationStateChanged( | 148 Java_WebContentsDelegateAndroid_navigationStateChanged( |
149 env, | 149 env, |
150 obj.obj(), | 150 obj.obj(), |
151 changed_flags); | 151 changed_flags); |
152 } | 152 } |
153 | 153 |
| 154 void WebContentsDelegateAndroid::VisibleSSLStateChanged( |
| 155 const WebContents* source) { |
| 156 JNIEnv* env = AttachCurrentThread(); |
| 157 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
| 158 if (obj.is_null()) |
| 159 return; |
| 160 Java_WebContentsDelegateAndroid_visibleSSLStateChanged( |
| 161 env, |
| 162 obj.obj()); |
| 163 } |
| 164 |
154 void WebContentsDelegateAndroid::ActivateContents(WebContents* contents) { | 165 void WebContentsDelegateAndroid::ActivateContents(WebContents* contents) { |
155 JNIEnv* env = AttachCurrentThread(); | 166 JNIEnv* env = AttachCurrentThread(); |
156 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 167 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
157 if (obj.is_null()) | 168 if (obj.is_null()) |
158 return; | 169 return; |
159 Java_WebContentsDelegateAndroid_activateContents(env, obj.obj()); | 170 Java_WebContentsDelegateAndroid_activateContents(env, obj.obj()); |
160 } | 171 } |
161 | 172 |
162 void WebContentsDelegateAndroid::DeactivateContents(WebContents* contents) { | 173 void WebContentsDelegateAndroid::DeactivateContents(WebContents* contents) { |
163 // On desktop the current window is deactivated here, bringing the next window | 174 // On desktop the current window is deactivated here, bringing the next window |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 // Native JNI methods | 384 // Native JNI methods |
374 // ---------------------------------------------------------------------------- | 385 // ---------------------------------------------------------------------------- |
375 | 386 |
376 // Register native methods | 387 // Register native methods |
377 | 388 |
378 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 389 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
379 return RegisterNativesImpl(env); | 390 return RegisterNativesImpl(env); |
380 } | 391 } |
381 | 392 |
382 } // namespace web_contents_delegate_android | 393 } // namespace web_contents_delegate_android |
OLD | NEW |