| OLD | NEW |
| 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 Loading... |
| 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(&AreSecureSurfacesSupported), 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 Loading... |
| 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 AreSecureSurfacesSupported() { |
| 387 // Not currently supported by HTML Viewer. |
| 388 return false; |
| 389 } |
| 390 |
| 385 } // namespace html_viewer | 391 } // namespace html_viewer |
| OLD | NEW |