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

Side by Side Diff: webkit/media/android/webmediaplayer_android.cc

Issue 12294008: Fix more remaining FilePath -> base::FilePath. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « testing/android/native_test_launcher.cc ('k') | win8/test/metro_registration_helper.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/media/android/webmediaplayer_android.h" 5 #include "webkit/media/android/webmediaplayer_android.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/android/media_player_bridge.h" 9 #include "media/base/android/media_player_bridge.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // content contains video. Android does not provide any function to do 139 // content contains video. Android does not provide any function to do
140 // this. 140 // this.
141 // We don't know whether the current media content has video unless 141 // We don't know whether the current media content has video unless
142 // the player is prepared. If the player is not prepared, we fall back 142 // the player is prepared. If the player is not prepared, we fall back
143 // to the mime-type. There may be no mime-type on a redirect URL. 143 // to the mime-type. There may be no mime-type on a redirect URL.
144 // In that case, we conservatively assume it contains video so that 144 // In that case, we conservatively assume it contains video so that
145 // enterfullscreen call will not fail. 145 // enterfullscreen call will not fail.
146 if (!url_.has_path()) 146 if (!url_.has_path())
147 return false; 147 return false;
148 std::string mime; 148 std::string mime;
149 if(!net::GetMimeTypeFromFile(FilePath(url_.path()), &mime)) 149 if(!net::GetMimeTypeFromFile(base::FilePath(url_.path()), &mime))
150 return true; 150 return true;
151 return mime.find("audio/") == std::string::npos; 151 return mime.find("audio/") == std::string::npos;
152 } 152 }
153 153
154 bool WebMediaPlayerAndroid::hasAudio() const { 154 bool WebMediaPlayerAndroid::hasAudio() const {
155 // TODO(hclam): Query status of audio and return the actual value. 155 // TODO(hclam): Query status of audio and return the actual value.
156 return true; 156 return true;
157 } 157 }
158 158
159 bool WebMediaPlayerAndroid::paused() const { 159 bool WebMediaPlayerAndroid::paused() const {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { 418 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) {
419 needs_establish_peer_ = needs_establish_peer; 419 needs_establish_peer_ = needs_establish_peer;
420 } 420 }
421 421
422 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { 422 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) {
423 is_playing_ = is_playing; 423 is_playing_ = is_playing;
424 } 424 }
425 425
426 } // namespace webkit_media 426 } // namespace webkit_media
OLDNEW
« no previous file with comments | « testing/android/native_test_launcher.cc ('k') | win8/test/metro_registration_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698