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

Side by Side Diff: components/html_viewer/html_document.cc

Issue 1124863005: Restrict use of hardware-secure codecs based on the RendererPreference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setsecurity
Patch Set: Comment for base::Unretained(). Created 5 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
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('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 "components/html_viewer/html_document.h" 5 #include "components/html_viewer/html_document.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 blink::WebLocalFrame* frame, 321 blink::WebLocalFrame* frame,
322 const blink::WebHistoryItem& history_item, 322 const blink::WebHistoryItem& history_item,
323 blink::WebHistoryCommitType commit_type) { 323 blink::WebHistoryCommitType commit_type) {
324 if (navigator_host_.get()) 324 if (navigator_host_.get())
325 navigator_host_->DidNavigateLocally(history_item.urlString().utf8()); 325 navigator_host_->DidNavigateLocally(history_item.urlString().utf8());
326 } 326 }
327 327
328 blink::WebEncryptedMediaClient* HTMLDocument::encryptedMediaClient() { 328 blink::WebEncryptedMediaClient* HTMLDocument::encryptedMediaClient() {
329 if (!web_encrypted_media_client_) { 329 if (!web_encrypted_media_client_) {
330 web_encrypted_media_client_.reset(new media::WebEncryptedMediaClientImpl( 330 web_encrypted_media_client_.reset(new media::WebEncryptedMediaClientImpl(
331 GetCdmFactory(), GetMediaPermission())); 331 base::Bind(&AreSecureCodecsSupported), GetCdmFactory(),
332 GetMediaPermission()));
332 } 333 }
333 return web_encrypted_media_client_.get(); 334 return web_encrypted_media_client_.get();
334 } 335 }
335 336
336 void HTMLDocument::OnViewBoundsChanged(View* view, 337 void HTMLDocument::OnViewBoundsChanged(View* view,
337 const Rect& old_bounds, 338 const Rect& old_bounds,
338 const Rect& new_bounds) { 339 const Rect& new_bounds) {
339 DCHECK_EQ(view, root_); 340 DCHECK_EQ(view, root_);
340 UpdateWebviewSizeFromViewSize(); 341 UpdateWebviewSizeFromViewSize();
341 } 342 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 media_permission_.reset(new media::DefaultMediaPermission(true)); 376 media_permission_.reset(new media::DefaultMediaPermission(true));
376 return media_permission_.get(); 377 return media_permission_.get();
377 } 378 }
378 379
379 media::CdmFactory* HTMLDocument::GetCdmFactory() { 380 media::CdmFactory* HTMLDocument::GetCdmFactory() {
380 if (!cdm_factory_) 381 if (!cdm_factory_)
381 cdm_factory_.reset(new media::DefaultCdmFactory()); 382 cdm_factory_.reset(new media::DefaultCdmFactory());
382 return cdm_factory_.get(); 383 return cdm_factory_.get();
383 } 384 }
384 385
386 bool AreSecureCodecsSupported() {
sky 2015/05/11 19:13:05 nit: move this into anonymous namespace at the top
sandersd (OOO until July 31) 2015/05/11 19:53:27 Done.
387 // Not currently supported by HTML Viewer.
388 return false;
389 }
390
385 } // namespace html_viewer 391 } // namespace html_viewer
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698