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

Unified Diff: chrome/common/platform_util_mac.mm

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_linux.cc ('k') | chrome/common/platform_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/platform_util_mac.mm
===================================================================
--- chrome/common/platform_util_mac.mm (revision 24928)
+++ chrome/common/platform_util_mac.mm (working copy)
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/cocoa/tab_window_controller.h"
+#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
namespace platform_util {
@@ -28,6 +29,13 @@
[[NSWorkspace sharedWorkspace] openFile:path_string];
}
+void OpenExternal(const GURL& url) {
+ DCHECK_EQ([NSThread currentThread], [NSThread mainThread]);
+ NSString* url_string = base::SysUTF8ToNSString(url.spec());
+ NSURL* ns_url = [NSURL URLWithString:url_string];
+ [[NSWorkspace sharedWorkspace] openURL:ns_url];
+}
+
gfx::NativeWindow GetTopLevel(gfx::NativeView view) {
return [view window];
}
« no previous file with comments | « chrome/common/platform_util_linux.cc ('k') | chrome/common/platform_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698