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

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

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 weak_factory_(this) { 153 weak_factory_(this) {
154 DCHECK(player_manager_); 154 DCHECK(player_manager_);
155 DCHECK(cdm_manager_); 155 DCHECK(cdm_manager_);
156 156
157 DCHECK(main_thread_checker_.CalledOnValidThread()); 157 DCHECK(main_thread_checker_.CalledOnValidThread());
158 stream_texture_factory_->AddObserver(this); 158 stream_texture_factory_->AddObserver(this);
159 159
160 player_id_ = player_manager_->RegisterMediaPlayer(this); 160 player_id_ = player_manager_->RegisterMediaPlayer(this);
161 161
162 #if defined(VIDEO_HOLE) 162 #if defined(VIDEO_HOLE)
163 force_use_overlay_embedded_video_ = CommandLine::ForCurrentProcess()-> 163 force_use_overlay_embedded_video_ =
164 HasSwitch(switches::kForceUseOverlayEmbeddedVideo); 164 base::CommandLine::ForCurrentProcess()->HasSwitch(
165 switches::kForceUseOverlayEmbeddedVideo);
165 if (force_use_overlay_embedded_video_ || 166 if (force_use_overlay_embedded_video_ ||
166 player_manager_->ShouldUseVideoOverlayForEmbeddedEncryptedVideo()) { 167 player_manager_->ShouldUseVideoOverlayForEmbeddedEncryptedVideo()) {
167 // Defer stream texture creation until we are sure it's necessary. 168 // Defer stream texture creation until we are sure it's necessary.
168 needs_establish_peer_ = false; 169 needs_establish_peer_ = false;
169 current_frame_ = VideoFrame::CreateBlackFrame(gfx::Size(1, 1)); 170 current_frame_ = VideoFrame::CreateBlackFrame(gfx::Size(1, 1));
170 } 171 }
171 #endif // defined(VIDEO_HOLE) 172 #endif // defined(VIDEO_HOLE)
172 TryCreateStreamTextureProxyIfNeeded(); 173 TryCreateStreamTextureProxyIfNeeded();
173 interpolator_.SetUpperBound(base::TimeDelta()); 174 interpolator_.SetUpperBound(base::TimeDelta());
174 175
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 1794
1794 bool WebMediaPlayerAndroid::IsHLSStream() const { 1795 bool WebMediaPlayerAndroid::IsHLSStream() const {
1795 std::string mime; 1796 std::string mime;
1796 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1797 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1797 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1798 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1798 return false; 1799 return false;
1799 return !mime.compare("application/x-mpegurl"); 1800 return !mime.compare("application/x-mpegurl");
1800 } 1801 }
1801 1802
1802 } // namespace content 1803 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_proxy.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698