OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "android_webview/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 browser_view_renderer_->SetWindowVisibility(visible); | 690 browser_view_renderer_->SetWindowVisibility(visible); |
691 } | 691 } |
692 | 692 |
693 void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) { | 693 void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) { |
694 browser_view_renderer_->SetIsPaused(paused); | 694 browser_view_renderer_->SetIsPaused(paused); |
695 if (paused) { | 695 if (paused) { |
696 ContentViewCore* cvc = | 696 ContentViewCore* cvc = |
697 ContentViewCore::FromWebContents(web_contents_.get()); | 697 ContentViewCore::FromWebContents(web_contents_.get()); |
698 if (cvc) | 698 if (cvc) |
699 cvc->PauseVideo(); | 699 cvc->PauseVideo(); |
| 700 web_contents_->PauseGeolocation(); |
| 701 } else { |
| 702 web_contents_->ResumeGeolocation(); |
700 } | 703 } |
701 } | 704 } |
702 | 705 |
703 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { | 706 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { |
704 browser_view_renderer_->OnAttachedToWindow(w, h); | 707 browser_view_renderer_->OnAttachedToWindow(w, h); |
705 } | 708 } |
706 | 709 |
707 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) { | 710 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) { |
708 browser_view_renderer_->OnDetachedFromWindow(); | 711 browser_view_renderer_->OnDetachedFromWindow(); |
709 } | 712 } |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 | 917 |
915 void AwContents::TrimMemory(JNIEnv* env, jobject obj, jint level) { | 918 void AwContents::TrimMemory(JNIEnv* env, jobject obj, jint level) { |
916 browser_view_renderer_->TrimMemory(level); | 919 browser_view_renderer_->TrimMemory(level); |
917 } | 920 } |
918 | 921 |
919 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 922 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
920 g_should_download_favicons = true; | 923 g_should_download_favicons = true; |
921 } | 924 } |
922 | 925 |
923 } // namespace android_webview | 926 } // namespace android_webview |
OLD | NEW |