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

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

Issue 2006113002: Allow hw secured codecs on chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New flag, new key system property Created 4 years, 7 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 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/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "chromecast/browser/android/cast_window_manager.h" 9 #include "chromecast/browser/android/cast_window_manager.h"
10 #include "chromecast/browser/cast_content_window.h" 10 #include "chromecast/browser/cast_content_window.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 Java_CastWindowAndroid_initFromNativeWebContents( 71 Java_CastWindowAndroid_initFromNativeWebContents(
72 env, window_java_.obj(), web_contents_->GetJavaWebContents().obj(), 72 env, window_java_.obj(), web_contents_->GetJavaWebContents().obj(),
73 web_contents_->GetRenderProcessHost()->GetID()); 73 web_contents_->GetRenderProcessHost()->GetID());
74 74
75 // Enabling hole-punching also requires runtime renderer preference 75 // Enabling hole-punching also requires runtime renderer preference
76 content::RendererPreferences* prefs = 76 content::RendererPreferences* prefs =
77 web_contents_->GetMutableRendererPrefs(); 77 web_contents_->GetMutableRendererPrefs();
78 prefs->use_video_overlay_for_embedded_encrypted_video = true; 78 prefs->use_video_overlay_for_embedded_encrypted_video = true;
79 prefs->use_view_overlay_for_all_video = true; 79 prefs->use_view_overlay_for_all_video = true;
80 prefs->hw_secure_codec_allowed = true;
80 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); 81 web_contents_->GetRenderViewHost()->SyncRendererPrefs();
81 } 82 }
82 83
83 CastWindowAndroid::~CastWindowAndroid() { 84 CastWindowAndroid::~CastWindowAndroid() {
84 } 85 }
85 86
86 void CastWindowAndroid::Close() { 87 void CastWindowAndroid::Close() {
87 // Close page first, which fires the window.unload event. The WebContents 88 // Close page first, which fires the window.unload event. The WebContents
88 // itself will be destroyed after browser-process has received renderer 89 // itself will be destroyed after browser-process has received renderer
89 // notification that the page is closed. 90 // notification that the page is closed.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 contents->GetRenderViewHost()->GetWidget()->Focus(); 150 contents->GetRenderViewHost()->GetWidget()->Focus();
150 } 151 }
151 152
152 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) { 153 void CastWindowAndroid::RenderProcessGone(base::TerminationStatus status) {
153 LOG(ERROR) << "Render process gone: status=" << status; 154 LOG(ERROR) << "Render process gone: status=" << status;
154 Destroy(); 155 Destroy();
155 } 156 }
156 157
157 } // namespace shell 158 } // namespace shell
158 } // namespace chromecast 159 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698