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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 385058: When extensions use notifications, display the name of the extension in UI ra... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.cc » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Methods to setup and modify permission preferences. 65 // Methods to setup and modify permission preferences.
66 void GrantPermission(const GURL& origin); 66 void GrantPermission(const GURL& origin);
67 void DenyPermission(const GURL& origin); 67 void DenyPermission(const GURL& origin);
68 68
69 NotificationsPrefsCache* prefs_cache() { return prefs_cache_; } 69 NotificationsPrefsCache* prefs_cache() { return prefs_cache_; }
70 70
71 private: 71 private:
72 void InitPrefs(); 72 void InitPrefs();
73 73
74 // Returns a display name for an origin, to be used in permission infobar
75 // or on the frame of the notification toast. Different from the origin
76 // itself when dealing with extensions.
77 std::wstring DisplayNameForOrigin(const GURL& origin);
78
74 // The profile which owns this object. 79 // The profile which owns this object.
75 Profile* profile_; 80 Profile* profile_;
76 81
77 // A cache of preferences which is accessible only on the IO thread 82 // A cache of preferences which is accessible only on the IO thread
78 // to service synchronous IPCs. 83 // to service synchronous IPCs.
79 scoped_refptr<NotificationsPrefsCache> prefs_cache_; 84 scoped_refptr<NotificationsPrefsCache> prefs_cache_;
80 85
81 // Non-owned pointer to the notification manager which manages the 86 // Non-owned pointer to the notification manager which manages the
82 // UI for desktop toasts. 87 // UI for desktop toasts.
83 NotificationUIManager* ui_manager_; 88 NotificationUIManager* ui_manager_;
84 89
85 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 90 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
86 }; 91 };
87 92
88 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 93 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698