void WebContentsAndroid::OnHide(JNIEnv* env, jobject obj) {
web_contents_->WasHidden();
- PauseVideo();
}
void WebContentsAndroid::OnShow(JNIEnv* env, jobject obj) {
#endif // defined(ENABLE_BROWSER_CDMS)
}
-void WebContentsAndroid::PauseVideo() {
- RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
- web_contents_->GetRenderViewHost());
- if (rvhi)
- rvhi->media_web_contents_observer()->PauseVideo();
-}
-
void WebContentsAndroid::AddStyleSheetByURL(
JNIEnv* env,
jobject obj,
void WebContentsAndroid::EvaluateJavaScript(JNIEnv* env,
jobject obj,
jstring script,
- jobject callback,
- jboolean start_renderer) {
+ jobject callback) {
RenderViewHost* rvh = web_contents_->GetRenderViewHost();
DCHECK(rvh);
- if (start_renderer && !rvh->IsRenderViewLive()) {
+ if (!rvh->IsRenderViewLive()) {
if (!static_cast<WebContentsImpl*>(web_contents_)->
CreateRenderViewForInitialEmptyDocument()) {
LOG(ERROR) << "Failed to create RenderView in EvaluateJavaScript";