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

Side by Side Diff: chrome/browser/notifications/sync_notifier/synced_notification_app_info.h

Issue 228753006: Reland r262272: "Hook up the Info URL from SyncedNotificationsAppInfo". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed test on linux+aura, disabled on linux-gtk Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This class represents the metadata for a service sending synced 5 // This class represents the metadata for a service sending synced
6 // notifications. 6 // notifications.
7 7
8 #ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_ H_ 8 #ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_ H_
9 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_ H_ 9 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_INFO_ H_
10 10
(...skipping 24 matching lines...) Expand all
35 bool HasAppId(const std::string& app_id); 35 bool HasAppId(const std::string& app_id);
36 36
37 // Add an app id to the supported set for this AppInfo protobuf. 37 // Add an app id to the supported set for this AppInfo protobuf.
38 void AddAppId(const std::string& app_id); 38 void AddAppId(const std::string& app_id);
39 39
40 // Remove an app id from the set for this AppInfo protobuf. 40 // Remove an app id from the set for this AppInfo protobuf.
41 void RemoveAppId(const std::string& app_id); 41 void RemoveAppId(const std::string& app_id);
42 42
43 std::string settings_display_name() const { return settings_display_name_; } 43 std::string settings_display_name() const { return settings_display_name_; }
44 44
45 // Sets/gets the link to navigate to when the user clicks on the body of the
46 // app's welcome notification.
47 void SetWelcomeLinkUrl(const GURL& settings_link_url);
48 GURL welcome_link_url() const { return welcome_link_url_; }
49
45 // Set the URL for the low and high DPI bitmaps for the settings dialog. 50 // Set the URL for the low and high DPI bitmaps for the settings dialog.
46 void SetSettingsURLs(const GURL& settings_low_dpi, 51 void SetSettingsURLs(const GURL& settings_low_dpi,
47 const GURL& settings_high_dpi); 52 const GURL& settings_high_dpi);
48 53
49 // Set the URL for the low and high DPI bitmaps for indicating the sending 54 // Set the URL for the low and high DPI bitmaps for indicating the sending
50 // service. 55 // service.
51 void SetMonochromeURLs(const GURL& monochrome_low_dpi, 56 void SetMonochromeURLs(const GURL& monochrome_low_dpi,
52 const GURL& monochrome_high_dpi); 57 const GURL& monochrome_high_dpi);
53 58
54 // Set the URL for the low and high DPI bitmaps for use by the welcome dialog. 59 // Set the URL for the low and high DPI bitmaps for use by the welcome dialog.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Construct a Message Center NotifierId from this synced notification app 101 // Construct a Message Center NotifierId from this synced notification app
97 // info object. 102 // info object.
98 message_center::NotifierId GetNotifierId(); 103 message_center::NotifierId GetNotifierId();
99 104
100 private: 105 private:
101 // TODO(petewil): We need a unique id for a key. We will use the settings 106 // TODO(petewil): We need a unique id for a key. We will use the settings
102 // display name, but it would be more robust with a unique id. 107 // display name, but it would be more robust with a unique id.
103 Profile* profile_; 108 Profile* profile_;
104 std::vector<std::string> app_ids_; 109 std::vector<std::string> app_ids_;
105 std::string settings_display_name_; 110 std::string settings_display_name_;
111 GURL welcome_link_url_;
112
106 // The 1x and 2x versions of the icon for settings, small. 113 // The 1x and 2x versions of the icon for settings, small.
107 scoped_ptr<ImageHolder> settings_holder_; 114 scoped_ptr<ImageHolder> settings_holder_;
108 // Monochrome icons for app badging (1x and 2x), small. 115 // Monochrome icons for app badging (1x and 2x), small.
109 scoped_ptr<ImageHolder> monochrome_holder_; 116 scoped_ptr<ImageHolder> monochrome_holder_;
110 // Welcome dialog icon (1x and 2x), large. 117 // Welcome dialog icon (1x and 2x), large.
111 scoped_ptr<ImageHolder> welcome_holder_; 118 scoped_ptr<ImageHolder> welcome_holder_;
112 // A landing page link for settings/welcome toast. 119 // A landing page link for settings/welcome toast.
113 GURL welcome_landing_page_url_; 120 GURL welcome_landing_page_url_;
114 std::vector<std::string> added_app_ids_; 121 std::vector<std::string> added_app_ids_;
115 std::vector<std::string> removed_app_ids_; 122 std::vector<std::string> removed_app_ids_;
116 SyncedNotificationAppInfoService* synced_notification_app_info_service_; 123 SyncedNotificationAppInfoService* synced_notification_app_info_service_;
117 124
118 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, AddRemoveTest); 125 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, AddRemoveTest);
119 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, GetAppIdListTest); 126 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, GetAppIdListTest);
120 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, 127 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest,
121 CreateBitmapFetcherTest); 128 CreateBitmapFetcherTest);
122 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, OnFetchCompleteTest); 129 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, OnFetchCompleteTest);
123 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, 130 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest,
124 QueueBitmapFetchJobsTest); 131 QueueBitmapFetchJobsTest);
125 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest, 132 FRIEND_TEST_ALL_PREFIXES(SyncedNotificationAppInfoTest,
126 AreAllBitmapsFetchedTest); 133 AreAllBitmapsFetchedTest);
127 134
128 DISALLOW_COPY_AND_ASSIGN(SyncedNotificationAppInfo); 135 DISALLOW_COPY_AND_ASSIGN(SyncedNotificationAppInfo);
129 }; 136 };
130 137
131 } // namespace notifier 138 } // namespace notifier
132 139
133 #endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_IN FO_H_ 140 #endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNCED_NOTIFICATION_APP_IN FO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698