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

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

Issue 1286583002: Stop setting --enable-overlay-fullscreen-video on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot namespace Created 5 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
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 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 1861
1862 if (cdm_context_) { 1862 if (cdm_context_) {
1863 decryptor_ready_cb.Run(cdm_context_->GetDecryptor(), 1863 decryptor_ready_cb.Run(cdm_context_->GetDecryptor(),
1864 base::Bind(&media::IgnoreCdmAttached)); 1864 base::Bind(&media::IgnoreCdmAttached));
1865 return; 1865 return;
1866 } 1866 }
1867 1867
1868 decryptor_ready_cb_ = decryptor_ready_cb; 1868 decryptor_ready_cb_ = decryptor_ready_cb;
1869 } 1869 }
1870 1870
1871 bool WebMediaPlayerAndroid::supportsOverlayFullscreenVideo() {
1872 return true;
1873 }
1874
1871 void WebMediaPlayerAndroid::enterFullscreen() { 1875 void WebMediaPlayerAndroid::enterFullscreen() {
1872 if (is_player_initialized_) 1876 if (is_player_initialized_)
1873 player_manager_->EnterFullscreen(player_id_); 1877 player_manager_->EnterFullscreen(player_id_);
1874 SetNeedsEstablishPeer(false); 1878 SetNeedsEstablishPeer(false);
1875 is_fullscreen_ = true; 1879 is_fullscreen_ = true;
1876 } 1880 }
1877 1881
1878 bool WebMediaPlayerAndroid::IsHLSStream() const { 1882 bool WebMediaPlayerAndroid::IsHLSStream() const {
1879 std::string mime; 1883 std::string mime;
1880 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1884 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1881 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1885 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1882 return false; 1886 return false;
1883 return !mime.compare("application/x-mpegurl"); 1887 return !mime.compare("application/x-mpegurl");
1884 } 1888 }
1885 1889
1886 void WebMediaPlayerAndroid::ReportHLSMetrics() const { 1890 void WebMediaPlayerAndroid::ReportHLSMetrics() const {
1887 if (player_type_ != MEDIA_PLAYER_TYPE_URL) 1891 if (player_type_ != MEDIA_PLAYER_TYPE_URL)
1888 return; 1892 return;
1889 1893
1890 bool is_hls = IsHLSStream(); 1894 bool is_hls = IsHLSStream();
1891 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); 1895 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls);
1892 if (is_hls) { 1896 if (is_hls) {
1893 media::RecordOriginOfHLSPlayback( 1897 media::RecordOriginOfHLSPlayback(
1894 GURL(frame_->document().securityOrigin().toString())); 1898 GURL(frame_->document().securityOrigin().toString()));
1895 } 1899 }
1896 } 1900 }
1897 1901
1898 } // namespace content 1902 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/shell/browser/blink_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698