Chromium Code Reviews| 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 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 Loading... | |
| 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 |
| OLD | NEW |