OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "chrome/browser/chromeos/file_manager/open_util.h" | 9 #include "chrome/browser/chromeos/file_manager/open_util.h" |
10 #include "chrome/browser/platform_util_internal.h" | 10 #include "chrome/browser/platform_util_internal.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // This code should be obsolete since we have default handlers in ChromeOS | 101 // This code should be obsolete since we have default handlers in ChromeOS |
102 // which should handle this. However - there are two things which make it | 102 // which should handle this. However - there are two things which make it |
103 // necessary to keep it in: | 103 // necessary to keep it in: |
104 // a.) The user might have deleted the default handler in this session. | 104 // a.) The user might have deleted the default handler in this session. |
105 // In this case we would need to have this in place. | 105 // In this case we would need to have this in place. |
106 // b.) There are several code paths which are not clear if they would call | 106 // b.) There are several code paths which are not clear if they would call |
107 // this function directly and which would therefore break (e.g. | 107 // this function directly and which would therefore break (e.g. |
108 // "Browser::EmailPageLocation" (to name only one). | 108 // "Browser::EmailPageLocation" (to name only one). |
109 // As such we should keep this code here. | 109 // As such we should keep this code here. |
110 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); | 110 chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); |
111 params.disposition = NEW_FOREGROUND_TAB; | 111 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
112 | 112 |
113 if (url.SchemeIs("mailto")) { | 113 if (url.SchemeIs("mailto")) { |
114 std::string string_url = kGmailComposeUrl; | 114 std::string string_url = kGmailComposeUrl; |
115 string_url.append(url.spec()); | 115 string_url.append(url.spec()); |
116 params.url = GURL(url); | 116 params.url = GURL(url); |
117 } | 117 } |
118 | 118 |
119 chrome::Navigate(¶ms); | 119 chrome::Navigate(¶ms); |
120 } | 120 } |
121 | 121 |
122 } // namespace platform_util | 122 } // namespace platform_util |
OLD | NEW |