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

Side by Side Diff: chrome/browser/notifications/notification_ui_manager_mac.mm

Issue 1902403003: Change the ellpisis (...) to Options as per UI review feedback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/notifications/notification_ui_manager_mac.h" 5 #include "chrome/browser/notifications/notification_ui_manager_mac.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 [toast setActionButtonTitle:l10n_util::GetNSString( 140 [toast setActionButtonTitle:l10n_util::GetNSString(
141 IDS_NOTIFICATION_BUTTON_SETTINGS)]; 141 IDS_NOTIFICATION_BUTTON_SETTINGS)];
142 } else { 142 } else {
143 // Otherwise show the alternate menu, then show the developer actions and 143 // Otherwise show the alternate menu, then show the developer actions and
144 // finally the settings one. 144 // finally the settings one.
145 DCHECK( 145 DCHECK(
146 [toast respondsToSelector:@selector(_alwaysShowAlternateActionMenu)]); 146 [toast respondsToSelector:@selector(_alwaysShowAlternateActionMenu)]);
147 DCHECK( 147 DCHECK(
148 [toast respondsToSelector:@selector(_alternateActionButtonTitles)]); 148 [toast respondsToSelector:@selector(_alternateActionButtonTitles)]);
149 149
150 // utf8 ellipsis: 150 [toast setActionButtonTitle:l10n_util::GetNSString(
151 [toast setActionButtonTitle:@"\u2026"]; 151 IDS_NOTIFICATION_BUTTON_OPTIONS)];
152 [toast setValue:@YES 152 [toast setValue:@YES
153 forKey:@"_alwaysShowAlternateActionMenu"]; 153 forKey:@"_alwaysShowAlternateActionMenu"];
154 154
155 NSMutableArray* buttons = [NSMutableArray arrayWithCapacity:3]; 155 NSMutableArray* buttons = [NSMutableArray arrayWithCapacity:3];
156 for (const auto& action : notification.buttons()) 156 for (const auto& action : notification.buttons())
157 [buttons addObject:base::SysUTF16ToNSString(action.title)]; 157 [buttons addObject:base::SysUTF16ToNSString(action.title)];
158 [buttons 158 [buttons
159 addObject:l10n_util::GetNSString(IDS_NOTIFICATION_BUTTON_SETTINGS)]; 159 addObject:l10n_util::GetNSString(IDS_NOTIFICATION_BUTTON_SETTINGS)];
160 160
161 [toast setValue:buttons forKey:@"_alternateActionButtonTitles"]; 161 [toast setValue:buttons forKey:@"_alternateActionButtonTitles"];
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 persistentNotificationId.longLongValue, buttonIndex); 360 persistentNotificationId.longLongValue, buttonIndex);
361 } 361 }
362 362
363 - (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center 363 - (BOOL)userNotificationCenter:(NSUserNotificationCenter*)center
364 shouldPresentNotification:(NSUserNotification*)nsNotification { 364 shouldPresentNotification:(NSUserNotification*)nsNotification {
365 // Always display notifications, regardless of whether the app is foreground. 365 // Always display notifications, regardless of whether the app is foreground.
366 return YES; 366 return YES;
367 } 367 }
368 368
369 @end 369 @end
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698