diff options
Diffstat (limited to 'chrome/common/platform_util_mac.mm')
-rw-r--r-- | chrome/common/platform_util_mac.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm index b8787ea8..9c4cbe2 100644 --- a/chrome/common/platform_util_mac.mm +++ b/chrome/common/platform_util_mac.mm @@ -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 @@ void OpenItem(const FilePath& full_path) { [[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]; } |