OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 web_contents_, false, url, delegate); | 344 web_contents_, false, url, delegate); |
345 delegate->set_interstitial_page(interstitial); | 345 delegate->set_interstitial_page(interstitial); |
346 interstitial->Show(); | 346 interstitial->Show(); |
347 } | 347 } |
348 | 348 |
349 jboolean WebContentsAndroid::IsShowingInterstitialPage(JNIEnv* env, | 349 jboolean WebContentsAndroid::IsShowingInterstitialPage(JNIEnv* env, |
350 jobject obj) { | 350 jobject obj) { |
351 return web_contents_->ShowingInterstitialPage(); | 351 return web_contents_->ShowingInterstitialPage(); |
352 } | 352 } |
353 | 353 |
| 354 jboolean WebContentsAndroid::FocusLocationBarByDefault(JNIEnv* env, |
| 355 jobject obj) { |
| 356 return web_contents_->FocusLocationBarByDefault(); |
| 357 } |
| 358 |
354 jboolean WebContentsAndroid::IsRenderWidgetHostViewReady( | 359 jboolean WebContentsAndroid::IsRenderWidgetHostViewReady( |
355 JNIEnv* env, | 360 JNIEnv* env, |
356 jobject obj) { | 361 jobject obj) { |
357 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 362 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
358 return view && view->HasValidFrame(); | 363 return view && view->HasValidFrame(); |
359 } | 364 } |
360 | 365 |
361 void WebContentsAndroid::ExitFullscreen(JNIEnv* env, jobject obj) { | 366 void WebContentsAndroid::ExitFullscreen(JNIEnv* env, jobject obj) { |
362 web_contents_->ExitFullscreen(); | 367 web_contents_->ExitFullscreen(); |
363 } | 368 } |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 web_contents_->StopMediaSession(); | 546 web_contents_->StopMediaSession(); |
542 } | 547 } |
543 | 548 |
544 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( | 549 ScopedJavaLocalRef<jstring> WebContentsAndroid::GetEncoding( |
545 JNIEnv* env, jobject obj) const { | 550 JNIEnv* env, jobject obj) const { |
546 return base::android::ConvertUTF8ToJavaString(env, | 551 return base::android::ConvertUTF8ToJavaString(env, |
547 web_contents_->GetEncoding()); | 552 web_contents_->GetEncoding()); |
548 } | 553 } |
549 | 554 |
550 } // namespace content | 555 } // namespace content |
OLD | NEW |