| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |