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

Side by Side Diff: chrome/browser/platform_util_chromeos.cc

Issue 5734002: Continuation of CL 5685007, rename the singleton accessor method in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Browser* browser = BrowserList::GetLastActive(); 81 Browser* browser = BrowserList::GetLastActive();
82 browser->AddSelectedTabWithURL(GURL(path), PageTransition::LINK); 82 browser->AddSelectedTabWithURL(GURL(path), PageTransition::LINK);
83 return; 83 return;
84 } 84 }
85 if (ext == ".avi" || 85 if (ext == ".avi" ||
86 ext == ".wav" || 86 ext == ".wav" ||
87 ext == ".mp4" || 87 ext == ".mp4" ||
88 ext == ".mp3" || 88 ext == ".mp3" ||
89 ext == ".mkv" || 89 ext == ".mkv" ||
90 ext == ".ogg") { 90 ext == ".ogg") {
91 MediaPlayer* mediaplayer = MediaPlayer::Get(); 91 MediaPlayer* mediaplayer = MediaPlayer::GetInstance();
92 std::string url = "file://"; 92 std::string url = "file://";
93 url += full_path.value(); 93 url += full_path.value();
94 GURL gurl(url); 94 GURL gurl(url);
95 mediaplayer->EnqueueMediaURL(gurl, NULL); 95 mediaplayer->EnqueueMediaURL(gurl, NULL);
96 return; 96 return;
97 } 97 }
98 98
99 // Unknwon file type. Show an error message to user. 99 // Unknwon file type. Show an error message to user.
100 BrowserThread::PostTask( 100 BrowserThread::PostTask(
101 BrowserThread::UI, FROM_HERE, 101 BrowserThread::UI, FROM_HERE,
(...skipping 14 matching lines...) Expand all
116 void OpenExternal(const GURL& url) { 116 void OpenExternal(const GURL& url) {
117 if (url.SchemeIs("mailto")) { 117 if (url.SchemeIs("mailto")) {
118 std::string string_url = kGmailComposeUrl; 118 std::string string_url = kGmailComposeUrl;
119 string_url.append(url.spec()); 119 string_url.append(url.spec());
120 BrowserThread::PostTask( 120 BrowserThread::PostTask(
121 BrowserThread::UI, FROM_HERE, NewRunnableFunction(OpenURL, string_url)); 121 BrowserThread::UI, FROM_HERE, NewRunnableFunction(OpenURL, string_url));
122 } 122 }
123 } 123 }
124 124
125 } // namespace platform_util 125 } // namespace platform_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698