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 15 matching lines...) Expand all Loading... | |
26 #include "components/view_manager/public/cpp/view_manager.h" | 26 #include "components/view_manager/public/cpp/view_manager.h" |
27 #include "components/view_manager/public/cpp/view_property.h" | 27 #include "components/view_manager/public/cpp/view_property.h" |
28 #include "components/view_manager/public/interfaces/surfaces.mojom.h" | 28 #include "components/view_manager/public/interfaces/surfaces.mojom.h" |
29 #include "mojo/application/public/cpp/application_impl.h" | 29 #include "mojo/application/public/cpp/application_impl.h" |
30 #include "mojo/application/public/cpp/connect.h" | 30 #include "mojo/application/public/cpp/connect.h" |
31 #include "mojo/application/public/interfaces/shell.mojom.h" | 31 #include "mojo/application/public/interfaces/shell.mojom.h" |
32 #include "mojo/converters/geometry/geometry_type_converters.h" | 32 #include "mojo/converters/geometry/geometry_type_converters.h" |
33 #include "skia/ext/refptr.h" | 33 #include "skia/ext/refptr.h" |
34 #include "third_party/WebKit/public/platform/Platform.h" | 34 #include "third_party/WebKit/public/platform/Platform.h" |
35 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" | 35 #include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h" |
36 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 36 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
ddorwin
2015/07/14 18:25:10
ditto
Srirama
2015/07/15 06:14:24
Done.
| |
37 #include "third_party/WebKit/public/platform/WebSize.h" | 37 #include "third_party/WebKit/public/platform/WebSize.h" |
38 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 38 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
39 #include "third_party/WebKit/public/web/WebDocument.h" | 39 #include "third_party/WebKit/public/web/WebDocument.h" |
40 #include "third_party/WebKit/public/web/WebElement.h" | 40 #include "third_party/WebKit/public/web/WebElement.h" |
41 #include "third_party/WebKit/public/web/WebInputEvent.h" | 41 #include "third_party/WebKit/public/web/WebInputEvent.h" |
42 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 42 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
43 #include "third_party/WebKit/public/web/WebRemoteFrame.h" | 43 #include "third_party/WebKit/public/web/WebRemoteFrame.h" |
44 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" | 44 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" |
45 #include "third_party/WebKit/public/web/WebScriptSource.h" | 45 #include "third_party/WebKit/public/web/WebScriptSource.h" |
46 #include "third_party/WebKit/public/web/WebSettings.h" | 46 #include "third_party/WebKit/public/web/WebSettings.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 } | 318 } |
319 | 319 |
320 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { | 320 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { |
321 return web_layer_tree_view_impl_.get(); | 321 return web_layer_tree_view_impl_.get(); |
322 } | 322 } |
323 | 323 |
324 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( | 324 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( |
325 blink::WebLocalFrame* frame, | 325 blink::WebLocalFrame* frame, |
326 const blink::WebURL& url, | 326 const blink::WebURL& url, |
327 blink::WebMediaPlayerClient* client, | 327 blink::WebMediaPlayerClient* client, |
328 blink::WebContentDecryptionModule* initial_cdm) { | |
329 return createMediaPlayer(frame, url, client, client, initial_cdm); | |
330 } | |
331 | |
332 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( | |
333 blink::WebLocalFrame* frame, | |
334 const blink::WebURL& url, | |
335 blink::WebMediaPlayerClient* client, | |
336 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, | 328 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
337 blink::WebContentDecryptionModule* initial_cdm) { | 329 blink::WebContentDecryptionModule* initial_cdm) { |
338 return global_state_->media_factory()->CreateMediaPlayer( | 330 return global_state_->media_factory()->CreateMediaPlayer( |
339 frame, url, client, encrypted_client, initial_cdm, | 331 frame, url, client, encrypted_client, initial_cdm, |
340 html_document_app_->shell()); | 332 html_document_app_->shell()); |
341 } | 333 } |
342 | 334 |
343 blink::WebFrame* HTMLDocument::createChildFrame( | 335 blink::WebFrame* HTMLDocument::createChildFrame( |
344 blink::WebLocalFrame* parent, | 336 blink::WebLocalFrame* parent, |
345 blink::WebTreeScopeType scope, | 337 blink::WebTreeScopeType scope, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
477 | 469 |
478 void HTMLDocument::UpdateFocus() { | 470 void HTMLDocument::UpdateFocus() { |
479 if (!web_view_) | 471 if (!web_view_) |
480 return; | 472 return; |
481 bool is_focused = root_ && root_->HasFocus(); | 473 bool is_focused = root_ && root_->HasFocus(); |
482 web_view_->setFocus(is_focused); | 474 web_view_->setFocus(is_focused); |
483 web_view_->setIsActive(is_focused); | 475 web_view_->setIsActive(is_focused); |
484 } | 476 } |
485 | 477 |
486 } // namespace html_viewer | 478 } // namespace html_viewer |
OLD | NEW |