| 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 browser_view_renderer_.SetWindowVisibility(visible); | 862 browser_view_renderer_.SetWindowVisibility(visible); |
| 863 } | 863 } |
| 864 | 864 |
| 865 void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) { | 865 void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) { |
| 866 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 866 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 867 browser_view_renderer_.SetIsPaused(paused); | 867 browser_view_renderer_.SetIsPaused(paused); |
| 868 ContentViewCore* cvc = | 868 ContentViewCore* cvc = |
| 869 ContentViewCore::FromWebContents(web_contents_.get()); | 869 ContentViewCore::FromWebContents(web_contents_.get()); |
| 870 if (cvc) { | 870 if (cvc) { |
| 871 cvc->PauseOrResumeGeolocation(paused); | 871 cvc->PauseOrResumeGeolocation(paused); |
| 872 if (paused) { | |
| 873 cvc->PauseVideo(); | |
| 874 } | |
| 875 } | 872 } |
| 876 } | 873 } |
| 877 | 874 |
| 878 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { | 875 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { |
| 879 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 876 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 880 browser_view_renderer_.OnAttachedToWindow(w, h); | 877 browser_view_renderer_.OnAttachedToWindow(w, h); |
| 881 } | 878 } |
| 882 | 879 |
| 883 void AwContents::InitializeHardwareDrawIfNeeded() { | 880 void AwContents::InitializeHardwareDrawIfNeeded() { |
| 884 GLViewRendererManager* manager = GLViewRendererManager::GetInstance(); | 881 GLViewRendererManager* manager = GLViewRendererManager::GetInstance(); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 } | 1167 } |
| 1171 | 1168 |
| 1172 browser_view_renderer_.TrimMemory(level, visible); | 1169 browser_view_renderer_.TrimMemory(level, visible); |
| 1173 } | 1170 } |
| 1174 | 1171 |
| 1175 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 1172 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
| 1176 g_should_download_favicons = true; | 1173 g_should_download_favicons = true; |
| 1177 } | 1174 } |
| 1178 | 1175 |
| 1179 } // namespace android_webview | 1176 } // namespace android_webview |
| OLD | NEW |