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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 WebContents* source) { | 368 WebContents* source) { |
369 JNIEnv* env = AttachCurrentThread(); | 369 JNIEnv* env = AttachCurrentThread(); |
370 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 370 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
371 if (obj.is_null()) | 371 if (obj.is_null()) |
372 return; | 372 return; |
373 Java_WebContentsDelegateAndroid_showRepostFormWarningDialog(env, obj.obj()); | 373 Java_WebContentsDelegateAndroid_showRepostFormWarningDialog(env, obj.obj()); |
374 } | 374 } |
375 | 375 |
376 void WebContentsDelegateAndroid::ToggleFullscreenModeForTab( | 376 void WebContentsDelegateAndroid::ToggleFullscreenModeForTab( |
377 WebContents* web_contents, | 377 WebContents* web_contents, |
| 378 const GURL& origin, |
378 bool enter_fullscreen) { | 379 bool enter_fullscreen) { |
379 JNIEnv* env = AttachCurrentThread(); | 380 JNIEnv* env = AttachCurrentThread(); |
380 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); | 381 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
381 if (obj.is_null()) | 382 if (obj.is_null()) |
382 return; | 383 return; |
383 Java_WebContentsDelegateAndroid_toggleFullscreenModeForTab( | 384 Java_WebContentsDelegateAndroid_toggleFullscreenModeForTab( |
384 env, obj.obj(), enter_fullscreen); | 385 env, obj.obj(), enter_fullscreen); |
385 } | 386 } |
386 | 387 |
387 bool WebContentsDelegateAndroid::IsFullscreenForTabOrPending( | 388 bool WebContentsDelegateAndroid::IsFullscreenForTabOrPending( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // Native JNI methods | 430 // Native JNI methods |
430 // ---------------------------------------------------------------------------- | 431 // ---------------------------------------------------------------------------- |
431 | 432 |
432 // Register native methods | 433 // Register native methods |
433 | 434 |
434 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 435 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
435 return RegisterNativesImpl(env); | 436 return RegisterNativesImpl(env); |
436 } | 437 } |
437 | 438 |
438 } // namespace web_contents_delegate_android | 439 } // namespace web_contents_delegate_android |
OLD | NEW |