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

Side by Side Diff: ui/message_center/cocoa/notification_controller.mm

Issue 2412983004: [Mac] Bring Chrome to the front when the settings button in a notification is clicked. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #import "ui/message_center/cocoa/notification_controller.h" 5 #import "ui/message_center/cocoa/notification_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 return layoutParams.rootFrame; 684 return layoutParams.rootFrame;
685 } 685 }
686 686
687 - (void)close:(id)sender { 687 - (void)close:(id)sender {
688 [closeButton_ setTarget:nil]; 688 [closeButton_ setTarget:nil];
689 messageCenter_->RemoveNotification([self notificationID], /*by_user=*/true); 689 messageCenter_->RemoveNotification([self notificationID], /*by_user=*/true);
690 } 690 }
691 691
692 - (void)settingsClicked:(id)sender { 692 - (void)settingsClicked:(id)sender {
693 [NSApp activateIgnoringOtherApps:YES];
693 messageCenter_->ClickOnSettingsButton([self notificationID]); 694 messageCenter_->ClickOnSettingsButton([self notificationID]);
694 } 695 }
695 696
696 - (void)buttonClicked:(id)button { 697 - (void)buttonClicked:(id)button {
697 messageCenter_->ClickOnNotificationButton([self notificationID], 698 messageCenter_->ClickOnNotificationButton([self notificationID],
698 [button tag]); 699 [button tag]);
699 } 700 }
700 701
701 - (const message_center::Notification*)notification { 702 - (const message_center::Notification*)notification {
702 return notification_; 703 return notification_;
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 forFont:(NSFont*)nsfont 984 forFont:(NSFont*)nsfont
984 maxNumberOfLines:(size_t)lines { 985 maxNumberOfLines:(size_t)lines {
985 size_t unused; 986 size_t unused;
986 return [self wrapText:text 987 return [self wrapText:text
987 forFont:nsfont 988 forFont:nsfont
988 maxNumberOfLines:lines 989 maxNumberOfLines:lines
989 actualLines:&unused]; 990 actualLines:&unused];
990 } 991 }
991 992
992 @end 993 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698