| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { | 330 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { |
| 331 return web_layer_tree_view_impl_.get(); | 331 return web_layer_tree_view_impl_.get(); |
| 332 } | 332 } |
| 333 | 333 |
| 334 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( | 334 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( |
| 335 blink::WebLocalFrame* frame, | 335 blink::WebLocalFrame* frame, |
| 336 const blink::WebURL& url, | 336 const blink::WebURL& url, |
| 337 blink::WebMediaPlayerClient* client, | 337 blink::WebMediaPlayerClient* client, |
| 338 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
| 338 blink::WebContentDecryptionModule* initial_cdm) { | 339 blink::WebContentDecryptionModule* initial_cdm) { |
| 339 return setup_->media_factory()->CreateMediaPlayer( | 340 return setup_->media_factory()->CreateMediaPlayer( |
| 340 frame, url, client, initial_cdm, html_document_app_->shell()); | 341 frame, url, client, encrypted_client, initial_cdm, |
| 342 html_document_app_->shell()); |
| 341 } | 343 } |
| 342 | 344 |
| 343 blink::WebFrame* HTMLDocument::createChildFrame( | 345 blink::WebFrame* HTMLDocument::createChildFrame( |
| 344 blink::WebLocalFrame* parent, | 346 blink::WebLocalFrame* parent, |
| 345 blink::WebTreeScopeType scope, | 347 blink::WebTreeScopeType scope, |
| 346 const blink::WebString& frameName, | 348 const blink::WebString& frameName, |
| 347 blink::WebSandboxFlags sandboxFlags) { | 349 blink::WebSandboxFlags sandboxFlags) { |
| 348 blink::WebLocalFrame* child_frame = blink::WebLocalFrame::create(scope, this); | 350 blink::WebLocalFrame* child_frame = blink::WebLocalFrame::create(scope, this); |
| 349 parent->appendChild(child_frame); | 351 parent->appendChild(child_frame); |
| 350 if (EnableOOPIFs()) { | 352 if (EnableOOPIFs()) { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 502 |
| 501 void HTMLDocument::UpdateFocus() { | 503 void HTMLDocument::UpdateFocus() { |
| 502 if (!web_view_) | 504 if (!web_view_) |
| 503 return; | 505 return; |
| 504 bool is_focused = root_ && root_->HasFocus(); | 506 bool is_focused = root_ && root_->HasFocus(); |
| 505 web_view_->setFocus(is_focused); | 507 web_view_->setFocus(is_focused); |
| 506 web_view_->setIsActive(is_focused); | 508 web_view_->setIsActive(is_focused); |
| 507 } | 509 } |
| 508 | 510 |
| 509 } // namespace html_viewer | 511 } // namespace html_viewer |
| OLD | NEW |