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

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

Issue 1292003004: Elide origins displayed on web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the use_origin flag in Notification do everything in NotificationView Created 5 years, 4 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) 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 #ifndef UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ 5 #ifndef UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_
6 #define UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ 6 #define UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 // Creates a new controller for a given notification. 65 // Creates a new controller for a given notification.
66 - (id)initWithNotification:(const message_center::Notification*)notification 66 - (id)initWithNotification:(const message_center::Notification*)notification
67 messageCenter:(message_center::MessageCenter*)messageCenter; 67 messageCenter:(message_center::MessageCenter*)messageCenter;
68 68
69 // If the model object changes, this method will update the views to reflect 69 // If the model object changes, this method will update the views to reflect
70 // the new model object. Returns the updated frame of the notification. 70 // the new model object. Returns the updated frame of the notification.
71 - (NSRect)updateNotification:(const message_center::Notification*)notification; 71 - (NSRect)updateNotification:(const message_center::Notification*)notification;
72 72
73 // Decides if the notification origin should be used as context message
74 - (bool)useOriginAsContextMessage:
Nico 2015/08/19 17:58:11 https://developer.apple.com/library/ios/documentat
Miguel Garcia 2015/08/19 19:52:46 Acknowledged.
75 (const message_center::Notification*)notification;
76
73 // Action for clicking on the notification's |closeButton_|. 77 // Action for clicking on the notification's |closeButton_|.
74 - (void)close:(id)sender; 78 - (void)close:(id)sender;
75 79
76 // Accessor for the notification. 80 // Accessor for the notification.
77 - (const message_center::Notification*)notification; 81 - (const message_center::Notification*)notification;
78 82
79 // Gets the notification ID. This string is owned by the NotificationController 83 // Gets the notification ID. This string is owned by the NotificationController
80 // rather than the model object, so it's safe to use after the Notification has 84 // rather than the model object, so it's safe to use after the Notification has
81 // been deleted. 85 // been deleted.
82 - (const std::string&)notificationID; 86 - (const std::string&)notificationID;
83 87
84 // Called when the user clicks within the notification view. 88 // Called when the user clicks within the notification view.
85 - (void)notificationClicked; 89 - (void)notificationClicked;
86 90
87 @end 91 @end
88 92
89 @interface MCNotificationController (TestingInterface) 93 @interface MCNotificationController (TestingInterface)
90 - (NSImageView*)smallImageView; 94 - (NSImageView*)smallImageView;
91 - (NSImageView*)iconView; 95 - (NSImageView*)iconView;
92 @end 96 @end
93 97
94 #endif // UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ 98 #endif // UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698