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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 message_id = IDS_FILE_BROWSER_ERROR_VIEWING_FILE_FOR_EXECUTABLE; | 51 message_id = IDS_FILE_BROWSER_ERROR_VIEWING_FILE_FOR_EXECUTABLE; |
52 else | 52 else |
53 message_id = IDS_FILE_BROWSER_ERROR_VIEWING_FILE; | 53 message_id = IDS_FILE_BROWSER_ERROR_VIEWING_FILE; |
54 break; | 54 break; |
55 | 55 |
56 case OPEN_FAILED_FILE_ERROR: | 56 case OPEN_FAILED_FILE_ERROR: |
57 message_id = IDS_FILE_BROWSER_ERROR_VIEWING_FILE; | 57 message_id = IDS_FILE_BROWSER_ERROR_VIEWING_FILE; |
58 break; | 58 break; |
59 } | 59 } |
60 | 60 |
61 Browser* browser = | 61 Browser* browser = chrome::FindTabbedBrowser(profile, false); |
62 chrome::FindTabbedBrowser(profile, false, chrome::HOST_DESKTOP_TYPE_ASH); | |
63 chrome::ShowMessageBox( | 62 chrome::ShowMessageBox( |
64 browser ? browser->window()->GetNativeWindow() : nullptr, | 63 browser ? browser->window()->GetNativeWindow() : nullptr, |
65 l10n_util::GetStringFUTF16(IDS_FILE_BROWSER_ERROR_VIEWING_FILE_TITLE, | 64 l10n_util::GetStringFUTF16(IDS_FILE_BROWSER_ERROR_VIEWING_FILE_TITLE, |
66 path.BaseName().AsUTF16Unsafe()), | 65 path.BaseName().AsUTF16Unsafe()), |
67 l10n_util::GetStringUTF16(message_id), chrome::MESSAGE_BOX_TYPE_WARNING); | 66 l10n_util::GetStringUTF16(message_id), chrome::MESSAGE_BOX_TYPE_WARNING); |
68 } | 67 } |
69 | 68 |
70 } // namespace | 69 } // namespace |
71 | 70 |
72 namespace internal { | 71 namespace internal { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 if (url.SchemeIs("mailto")) { | 114 if (url.SchemeIs("mailto")) { |
116 std::string string_url = kGmailComposeUrl; | 115 std::string string_url = kGmailComposeUrl; |
117 string_url.append(url.spec()); | 116 string_url.append(url.spec()); |
118 params.url = GURL(url); | 117 params.url = GURL(url); |
119 } | 118 } |
120 | 119 |
121 chrome::Navigate(¶ms); | 120 chrome::Navigate(¶ms); |
122 } | 121 } |
123 | 122 |
124 } // namespace platform_util | 123 } // namespace platform_util |
OLD | NEW |