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

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

Issue 564943002: Fix incorrect WebMediaPlayerDelegate notifications. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@psb
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 1282
1283 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { 1283 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) {
1284 needs_establish_peer_ = needs_establish_peer; 1284 needs_establish_peer_ = needs_establish_peer;
1285 } 1285 }
1286 1286
1287 void WebMediaPlayerAndroid::setPoster(const blink::WebURL& poster) { 1287 void WebMediaPlayerAndroid::setPoster(const blink::WebURL& poster) {
1288 player_manager_->SetPoster(player_id_, poster); 1288 player_manager_->SetPoster(player_id_, poster);
1289 } 1289 }
1290 1290
1291 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { 1291 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) {
1292 const bool was_playing = is_playing_;
1292 is_playing_ = is_playing; 1293 is_playing_ = is_playing;
1293 if (!delegate_) 1294 if (!delegate_)
1294 return; 1295 return;
1295 if (is_playing) 1296 if (!was_playing && is_playing)
1296 delegate_->DidPlay(this); 1297 delegate_->DidPlay(this);
1297 else 1298 else if (was_playing)
acolwell GONE FROM CHROMIUM 2014/09/11 19:23:25 nit: Don't you need && !is_playing_ here so you on
DaleCurtis 2014/09/11 19:28:01 Done.
1298 delegate_->DidPause(this); 1299 delegate_->DidPause(this);
1299 } 1300 }
1300 1301
1301 #if defined(VIDEO_HOLE) 1302 #if defined(VIDEO_HOLE)
1302 bool WebMediaPlayerAndroid::UpdateBoundaryRectangle() { 1303 bool WebMediaPlayerAndroid::UpdateBoundaryRectangle() {
1303 if (!video_weblayer_) 1304 if (!video_weblayer_)
1304 return false; 1305 return false;
1305 1306
1306 // Compute the geometry of video frame layer. 1307 // Compute the geometry of video frame layer.
1307 cc::Layer* layer = video_weblayer_->layer(); 1308 cc::Layer* layer = video_weblayer_->layer();
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 1770
1770 bool WebMediaPlayerAndroid::IsHLSStream() const { 1771 bool WebMediaPlayerAndroid::IsHLSStream() const {
1771 std::string mime; 1772 std::string mime;
1772 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1773 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1773 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1774 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1774 return false; 1775 return false;
1775 return !mime.compare("application/x-mpegurl"); 1776 return !mime.compare("application/x-mpegurl");
1776 } 1777 }
1777 1778
1778 } // namespace content 1779 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698