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

Unified Diff: chrome/common/platform_util_linux.cc

Issue 177040: Linux: handle external protocols, e.g. mailto: links. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/platform_util.h ('k') | chrome/common/platform_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/platform_util_linux.cc
===================================================================
--- chrome/common/platform_util_linux.cc (revision 24928)
+++ chrome/common/platform_util_linux.cc (working copy)
@@ -10,13 +10,14 @@
#include "base/process_util.h"
#include "base/string_util.h"
#include "chrome/common/process_watcher.h"
+#include "googleurl/src/gurl.h"
namespace {
-void XDGOpen(const FilePath& path) {
+void XDGOpen(const std::string& path) {
std::vector<std::string> argv;
argv.push_back("xdg-open");
- argv.push_back(path.value());
+ argv.push_back(path);
base::environment_vector env;
// xdg-open can fall back on mailcap which eventually might plumb through
@@ -43,13 +44,17 @@
if (!file_util::DirectoryExists(dir))
return;
- XDGOpen(dir);
+ XDGOpen(dir.value());
}
void OpenItem(const FilePath& full_path) {
- XDGOpen(full_path);
+ XDGOpen(full_path.value());
}
+void OpenExternal(const GURL& url) {
+ XDGOpen(url.spec());
+}
+
gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
// A detached widget won't have a toplevel window as an ancestor, so we can't
// assume that the query for toplevel will return a window.
« no previous file with comments | « chrome/common/platform_util.h ('k') | chrome/common/platform_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698