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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 388643002: Rotation into Video Layer + Content Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed android webmediaplayer Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 // previously called. 782 // previously called.
783 if (!paused() && needs_establish_peer_) 783 if (!paused() && needs_establish_peer_)
784 EstablishSurfaceTexturePeer(); 784 EstablishSurfaceTexturePeer();
785 785
786 natural_size_.width = width; 786 natural_size_.width = width;
787 natural_size_.height = height; 787 natural_size_.height = height;
788 ReallocateVideoFrame(); 788 ReallocateVideoFrame();
789 789
790 // Lazily allocate compositing layer. 790 // Lazily allocate compositing layer.
791 if (!video_weblayer_) { 791 if (!video_weblayer_) {
792 video_weblayer_.reset(new WebLayerImpl(cc::VideoLayer::Create(this))); 792 video_weblayer_.reset(new WebLayerImpl(
793 cc::VideoLayer::Create(this, media::VIDEO_ROTATION_0)));
793 client_->setWebLayer(video_weblayer_.get()); 794 client_->setWebLayer(video_weblayer_.get());
794 } 795 }
795 796
796 // TODO(qinmin): This is a hack. We need the media element to stop showing the 797 // TODO(qinmin): This is a hack. We need the media element to stop showing the
797 // poster image by forcing it to call setDisplayMode(video). Should move the 798 // poster image by forcing it to call setDisplayMode(video). Should move the
798 // logic into HTMLMediaElement.cpp. 799 // logic into HTMLMediaElement.cpp.
799 client_->timeChanged(); 800 client_->timeChanged();
800 } 801 }
801 802
802 void WebMediaPlayerAndroid::OnTimeUpdate(const base::TimeDelta& current_time) { 803 void WebMediaPlayerAndroid::OnTimeUpdate(const base::TimeDelta& current_time) {
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 player_manager_->EnterFullscreen(player_id_, frame_); 1603 player_manager_->EnterFullscreen(player_id_, frame_);
1603 SetNeedsEstablishPeer(false); 1604 SetNeedsEstablishPeer(false);
1604 } 1605 }
1605 } 1606 }
1606 1607
1607 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1608 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1608 return player_manager_->CanEnterFullscreen(frame_); 1609 return player_manager_->CanEnterFullscreen(frame_);
1609 } 1610 }
1610 1611
1611 } // namespace content 1612 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | content/renderer/media/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698