| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = NEW_FOREGROUND_TAB; |
| 112 params.host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; | |
| 113 | 112 |
| 114 if (url.SchemeIs("mailto")) { | 113 if (url.SchemeIs("mailto")) { |
| 115 std::string string_url = kGmailComposeUrl; | 114 std::string string_url = kGmailComposeUrl; |
| 116 string_url.append(url.spec()); | 115 string_url.append(url.spec()); |
| 117 params.url = GURL(url); | 116 params.url = GURL(url); |
| 118 } | 117 } |
| 119 | 118 |
| 120 chrome::Navigate(¶ms); | 119 chrome::Navigate(¶ms); |
| 121 } | 120 } |
| 122 | 121 |
| 123 } // namespace platform_util | 122 } // namespace platform_util |
| OLD | NEW |