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

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

Issue 23464080: [Android] Decouple pausing video from RenderView pause. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 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
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 void AwContents::SetViewVisibility(JNIEnv* env, jobject obj, bool visible) { 679 void AwContents::SetViewVisibility(JNIEnv* env, jobject obj, bool visible) {
680 browser_view_renderer_->SetViewVisibility(visible); 680 browser_view_renderer_->SetViewVisibility(visible);
681 } 681 }
682 682
683 void AwContents::SetWindowVisibility(JNIEnv* env, jobject obj, bool visible) { 683 void AwContents::SetWindowVisibility(JNIEnv* env, jobject obj, bool visible) {
684 browser_view_renderer_->SetWindowVisibility(visible); 684 browser_view_renderer_->SetWindowVisibility(visible);
685 } 685 }
686 686
687 void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) { 687 void AwContents::SetIsPaused(JNIEnv* env, jobject obj, bool paused) {
688 browser_view_renderer_->SetIsPaused(paused); 688 browser_view_renderer_->SetIsPaused(paused);
689 if (paused) {
690 ContentViewCore* cvc =
691 ContentViewCore::FromWebContents(web_contents_.get());
692 if (cvc)
693 cvc->PauseVideo();
694 }
689 } 695 }
690 696
691 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { 697 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) {
692 browser_view_renderer_->OnAttachedToWindow(w, h); 698 browser_view_renderer_->OnAttachedToWindow(w, h);
693 } 699 }
694 700
695 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) { 701 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) {
696 browser_view_renderer_->OnDetachedFromWindow(); 702 browser_view_renderer_->OnDetachedFromWindow();
697 } 703 }
698 704
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 browser_view_renderer_->EnableOnNewPicture(enabled); 863 browser_view_renderer_->EnableOnNewPicture(enabled);
858 } 864 }
859 865
860 void AwContents::SetJsOnlineProperty(JNIEnv* env, 866 void AwContents::SetJsOnlineProperty(JNIEnv* env,
861 jobject obj, 867 jobject obj,
862 jboolean network_up) { 868 jboolean network_up) {
863 render_view_host_ext_->SetJsOnlineProperty(network_up); 869 render_view_host_ext_->SetJsOnlineProperty(network_up);
864 } 870 }
865 871
866 } // namespace android_webview 872 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698