Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: chrome/browser/platform_util_chromeos.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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(&params); 120 chrome::Navigate(&params);
122 } 121 }
123 122
124 } // namespace platform_util 123 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/profiles/profile_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698