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

Unified Diff: chrome/browser/ui/cocoa/notifications/notification_builder_mac.h

Issue 2053613002: Make the notification builder more XPC friendly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert unintended change Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/notifications/notification_builder_mac.h
diff --git a/chrome/browser/notifications/notification_builder_mac.h b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.h
similarity index 85%
rename from chrome/browser/notifications/notification_builder_mac.h
rename to chrome/browser/ui/cocoa/notifications/notification_builder_mac.h
index 692e02128691c8cfa889c8bb8db8e1777e570c94..baa183311f6a0dae269b7a284160d8cb4362ef68 100644
--- a/chrome/browser/notifications/notification_builder_mac.h
+++ b/chrome/browser/ui/cocoa/notifications/notification_builder_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_
-#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_
+#ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_
+#define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_
#import <Foundation/Foundation.h>
@@ -12,10 +12,12 @@
@class NSUserNotification;
namespace notification_builder {
+
extern NSString* const kNotificationOrigin;
extern NSString* const kNotificationId;
extern NSString* const kNotificationProfileId;
extern NSString* const kNotificationIncognito;
+
} // notification_builder
// Provides a marshallable way for storing the information required to construct
@@ -47,6 +49,9 @@ extern NSString* const kNotificationIncognito;
- (instancetype)initWithDictionary:(NSDictionary*)data;
// Setters
+// Note for XPC users. Always use the setters from Chrome's main app. Do not
+// attempt to use them from XPC since some of the default strings and other
+// defaults are not available from the xpc service.
- (void)setTitle:(NSString*)title;
- (void)setSubTitle:(NSString*)subTitle;
- (void)setContextMessage:(NSString*)contextMessage;
@@ -70,4 +75,4 @@ extern NSString* const kNotificationIncognito;
@end
-#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_
+#endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_
« no previous file with comments | « chrome/browser/ui/cocoa/notifications/BUILD.gn ('k') | chrome/browser/ui/cocoa/notifications/notification_builder_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698