OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 NewRunnableFunction(&OpenFileBrowserOnUIThread, dir)); | 58 NewRunnableFunction(&OpenFileBrowserOnUIThread, dir)); |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 void OpenItem(const FilePath& full_path) { | 62 void OpenItem(const FilePath& full_path) { |
63 FileManagerUtil::ViewItem(full_path, false); | 63 FileManagerUtil::ViewItem(full_path, false); |
64 } | 64 } |
65 | 65 |
66 static void OpenURL(const std::string& url) { | 66 static void OpenURL(const std::string& url) { |
67 Browser* browser = BrowserList::GetLastActive(); | 67 Browser* browser = BrowserList::GetLastActive(); |
68 browser->AddSelectedTabWithURL(GURL(url), PageTransition::LINK); | 68 browser->AddSelectedTabWithURL(GURL(url), content::PAGE_TRANSITION_LINK); |
69 } | 69 } |
70 | 70 |
71 void OpenExternal(const GURL& url) { | 71 void OpenExternal(const GURL& url) { |
72 if (url.SchemeIs("mailto")) { | 72 if (url.SchemeIs("mailto")) { |
73 std::string string_url = kGmailComposeUrl; | 73 std::string string_url = kGmailComposeUrl; |
74 string_url.append(url.spec()); | 74 string_url.append(url.spec()); |
75 BrowserThread::PostTask( | 75 BrowserThread::PostTask( |
76 BrowserThread::UI, FROM_HERE, NewRunnableFunction(OpenURL, string_url)); | 76 BrowserThread::UI, FROM_HERE, NewRunnableFunction(OpenURL, string_url)); |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 } // namespace platform_util | 80 } // namespace platform_util |
OLD | NEW |