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

Side by Side Diff: chromecast/browser/android/cast_window_android.cc

Issue 1025933002: Convert force video overlay to preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 9 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 | « android_webview/native/aw_settings.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/android/cast_window_android.h" 5 #include "chromecast/browser/android/cast_window_android.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "chromecast/browser/android/cast_window_manager.h" 8 #include "chromecast/browser/android/cast_window_manager.h"
9 #include "chromecast/browser/cast_content_window.h" 9 #include "chromecast/browser/cast_content_window.h"
10 #include "content/public/browser/devtools_agent_host.h" 10 #include "content/public/browser/devtools_agent_host.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 content::WebContentsObserver::Observe(web_contents_.get()); 65 content::WebContentsObserver::Observe(web_contents_.get());
66 66
67 JNIEnv* env = base::android::AttachCurrentThread(); 67 JNIEnv* env = base::android::AttachCurrentThread();
68 window_java_.Reset(CreateCastWindowView(this)); 68 window_java_.Reset(CreateCastWindowView(this));
69 69
70 Java_CastWindowAndroid_initFromNativeWebContents( 70 Java_CastWindowAndroid_initFromNativeWebContents(
71 env, window_java_.obj(), web_contents_->GetJavaWebContents().obj(), 71 env, window_java_.obj(), web_contents_->GetJavaWebContents().obj(),
72 web_contents_->GetRenderProcessHost()->GetID()); 72 web_contents_->GetRenderProcessHost()->GetID());
73 73
74 // Enabling hole-punching also requires runtime renderer preference 74 // Enabling hole-punching also requires runtime renderer preference
75 web_contents_->GetMutableRendererPrefs()-> 75 content::RendererPreferences* prefs =
76 use_video_overlay_for_embedded_encrypted_video = true; 76 web_contents_->GetMutableRendererPrefs();
77 prefs->use_video_overlay_for_embedded_encrypted_video = true;
78 prefs->use_view_overlay_for_all_video = true;
77 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); 79 web_contents_->GetRenderViewHost()->SyncRendererPrefs();
78 } 80 }
79 81
80 CastWindowAndroid::~CastWindowAndroid() { 82 CastWindowAndroid::~CastWindowAndroid() {
81 } 83 }
82 84
83 void CastWindowAndroid::Close() { 85 void CastWindowAndroid::Close() {
84 // Close page first, which fires the window.unload event. The WebContents 86 // Close page first, which fires the window.unload event. The WebContents
85 // itself will be destroyed after browser-process has received renderer 87 // itself will be destroyed after browser-process has received renderer
86 // notification that the page is closed. 88 // notification that the page is closed.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 contents->GetRenderViewHost()->Blur(); 153 contents->GetRenderViewHost()->Blur();
152 } 154 }
153 155
154 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { 156 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) {
155 LOG(ERROR) << "Render process gone: status=" << status; 157 LOG(ERROR) << "Render process gone: status=" << status;
156 Destroy(); 158 Destroy();
157 } 159 }
158 160
159 } // namespace shell 161 } // namespace shell
160 } // namespace chromecast 162 } // namespace chromecast
OLDNEW
« no previous file with comments | « android_webview/native/aw_settings.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698