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

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

Issue 1133033003: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new path for createMediaPlayer() Created 5 years, 5 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
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/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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { 319 blink::WebLayerTreeView* HTMLDocument::layerTreeView() {
320 return web_layer_tree_view_impl_.get(); 320 return web_layer_tree_view_impl_.get();
321 } 321 }
322 322
323 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( 323 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer(
324 blink::WebLocalFrame* frame, 324 blink::WebLocalFrame* frame,
325 const blink::WebURL& url, 325 const blink::WebURL& url,
326 blink::WebMediaPlayerClient* client, 326 blink::WebMediaPlayerClient* client,
327 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
327 blink::WebContentDecryptionModule* initial_cdm) { 328 blink::WebContentDecryptionModule* initial_cdm) {
328 return global_state_->media_factory()->CreateMediaPlayer( 329 return global_state_->media_factory()->CreateMediaPlayer(
329 frame, url, client, initial_cdm, html_document_app_->shell()); 330 frame, url, client, encrypted_client, initial_cdm,
331 html_document_app_->shell());
330 } 332 }
331 333
332 blink::WebFrame* HTMLDocument::createChildFrame( 334 blink::WebFrame* HTMLDocument::createChildFrame(
333 blink::WebLocalFrame* parent, 335 blink::WebLocalFrame* parent,
334 blink::WebTreeScopeType scope, 336 blink::WebTreeScopeType scope,
335 const blink::WebString& frameName, 337 const blink::WebString& frameName,
336 blink::WebSandboxFlags sandboxFlags) { 338 blink::WebSandboxFlags sandboxFlags) {
337 blink::WebLocalFrame* child_frame = blink::WebLocalFrame::create(scope, this); 339 blink::WebLocalFrame* child_frame = blink::WebLocalFrame::create(scope, this);
338 parent->appendChild(child_frame); 340 parent->appendChild(child_frame);
339 return child_frame; 341 return child_frame;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 468
467 void HTMLDocument::UpdateFocus() { 469 void HTMLDocument::UpdateFocus() {
468 if (!web_view_) 470 if (!web_view_)
469 return; 471 return;
470 bool is_focused = root_ && root_->HasFocus(); 472 bool is_focused = root_ && root_->HasFocus();
471 web_view_->setFocus(is_focused); 473 web_view_->setFocus(is_focused);
472 web_view_->setIsActive(is_focused); 474 web_view_->setIsActive(is_focused);
473 } 475 }
474 476
475 } // namespace html_viewer 477 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698