Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1037)

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 570183002: Make the pause of video playback and video capture consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also make video playback consistent Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 861 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
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);
boliu 2014/09/20 01:05:21 do you know how chrome handles pausing geolocation
michaelbai 2014/09/22 05:48:11 PauseOrResumeGeolocation has similar code path as
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698