| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 setup_->compositor_thread(), surface.Pass(), gpu_service.Pass())); | 243 setup_->compositor_thread(), surface.Pass(), gpu_service.Pass())); |
| 244 } | 244 } |
| 245 | 245 |
| 246 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { | 246 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { |
| 247 return web_layer_tree_view_impl_.get(); | 247 return web_layer_tree_view_impl_.get(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( | 250 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( |
| 251 blink::WebLocalFrame* frame, | 251 blink::WebLocalFrame* frame, |
| 252 const blink::WebURL& url, | 252 const blink::WebURL& url, |
| 253 blink::WebMediaPlayerClient* client) { | |
| 254 return createMediaPlayer(frame, url, client, nullptr); | |
| 255 } | |
| 256 | |
| 257 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( | |
| 258 blink::WebLocalFrame* frame, | |
| 259 const blink::WebURL& url, | |
| 260 blink::WebMediaPlayerClient* client, | 253 blink::WebMediaPlayerClient* client, |
| 261 blink::WebContentDecryptionModule* initial_cdm) { | 254 blink::WebContentDecryptionModule* initial_cdm) { |
| 262 blink::WebMediaPlayer* player = | 255 blink::WebMediaPlayer* player = |
| 263 setup_->web_media_player_factory() | 256 setup_->web_media_player_factory() |
| 264 ? setup_->web_media_player_factory()->CreateMediaPlayer( | 257 ? setup_->web_media_player_factory()->CreateMediaPlayer( |
| 265 frame, url, client, GetMediaPermission(), GetCdmFactory(), | 258 frame, url, client, GetMediaPermission(), GetCdmFactory(), |
| 266 initial_cdm, shell_) | 259 initial_cdm, shell_) |
| 267 : nullptr; | 260 : nullptr; |
| 268 return player; | 261 return player; |
| 269 } | 262 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 return media_permission_.get(); | 390 return media_permission_.get(); |
| 398 } | 391 } |
| 399 | 392 |
| 400 media::CdmFactory* HTMLDocument::GetCdmFactory() { | 393 media::CdmFactory* HTMLDocument::GetCdmFactory() { |
| 401 if (!cdm_factory_) | 394 if (!cdm_factory_) |
| 402 cdm_factory_.reset(new media::DefaultCdmFactory()); | 395 cdm_factory_.reset(new media::DefaultCdmFactory()); |
| 403 return cdm_factory_.get(); | 396 return cdm_factory_.get(); |
| 404 } | 397 } |
| 405 | 398 |
| 406 } // namespace html_viewer | 399 } // namespace html_viewer |
| OLD | NEW |