| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |