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

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: 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
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 ContentViewCore::FromWebContents(web_contents_.get())->PauseVideo();
boliu 2013/09/19 01:58:39 condition on if (paused)
joth 2013/09/19 02:41:50 null check it.
benm (inactive) 2013/09/19 03:27:32 Done both, thanks!
689 } 690 }
690 691
691 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { 692 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) {
692 browser_view_renderer_->OnAttachedToWindow(w, h); 693 browser_view_renderer_->OnAttachedToWindow(w, h);
693 } 694 }
694 695
695 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) { 696 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) {
696 browser_view_renderer_->OnDetachedFromWindow(); 697 browser_view_renderer_->OnDetachedFromWindow();
697 } 698 }
698 699
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 browser_view_renderer_->EnableOnNewPicture(enabled); 858 browser_view_renderer_->EnableOnNewPicture(enabled);
858 } 859 }
859 860
860 void AwContents::SetJsOnlineProperty(JNIEnv* env, 861 void AwContents::SetJsOnlineProperty(JNIEnv* env,
861 jobject obj, 862 jobject obj,
862 jboolean network_up) { 863 jboolean network_up) {
863 render_view_host_ext_->SetJsOnlineProperty(network_up); 864 render_view_host_ext_->SetJsOnlineProperty(network_up);
864 } 865 }
865 866
866 } // namespace android_webview 867 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/content_view_core_impl.h » ('j') | content/browser/android/content_view_core_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698