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

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

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. Created 9 years, 2 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "chrome/browser/content_settings/content_settings_provider.h" 16 #include "chrome/browser/content_settings/content_settings_provider.h"
17 #include "chrome/browser/content_settings/host_content_settings_map.h"
18 #include "chrome/browser/profiles/profile_keyed_service.h" 17 #include "chrome/browser/profiles/profile_keyed_service.h"
19 #include "chrome/common/content_settings.h" 18 #include "chrome/common/content_settings.h"
20 #include "content/common/notification_observer.h" 19 #include "content/common/notification_observer.h"
21 #include "content/common/notification_registrar.h" 20 #include "content/common/notification_registrar.h"
22 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
25 24
26 class ContentSettingsPattern; 25 class ContentSettingsPattern;
27 class Extension; 26 class Extension;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ContentSetting GetDefaultContentSetting(); 100 ContentSetting GetDefaultContentSetting();
102 void SetDefaultContentSetting(ContentSetting setting); 101 void SetDefaultContentSetting(ContentSetting setting);
103 bool IsDefaultContentSettingManaged() const; 102 bool IsDefaultContentSettingManaged() const;
104 103
105 // NOTE: This should only be called on the UI thread. 104 // NOTE: This should only be called on the UI thread.
106 void ResetToDefaultContentSetting(); 105 void ResetToDefaultContentSetting();
107 106
108 // Returns all notifications settings. |settings| is cleared before 107 // Returns all notifications settings. |settings| is cleared before
109 // notifications setting are passed to it. 108 // notifications setting are passed to it.
110 void GetNotificationsSettings( 109 void GetNotificationsSettings(
111 HostContentSettingsMap::SettingsForOneType* settings); 110 ContentSettingsForOneType* settings);
112 111
113 // Clears the notifications setting for the given pattern. 112 // Clears the notifications setting for the given pattern.
114 void ClearSetting(const ContentSettingsPattern& pattern); 113 void ClearSetting(const ContentSettingsPattern& pattern);
115 114
116 // Clears the sets of explicitly allowed and denied origins. 115 // Clears the sets of explicitly allowed and denied origins.
117 void ResetAllOrigins(); 116 void ResetAllOrigins();
118 117
119 ContentSetting GetContentSetting(const GURL& origin); 118 ContentSetting GetContentSetting(const GURL& origin);
120 119
121 // Checks to see if a given origin has permission to create desktop 120 // Checks to see if a given origin has permission to create desktop
(...skipping 22 matching lines...) Expand all
144 // Non-owned pointer to the notification manager which manages the 143 // Non-owned pointer to the notification manager which manages the
145 // UI for desktop toasts. 144 // UI for desktop toasts.
146 NotificationUIManager* ui_manager_; 145 NotificationUIManager* ui_manager_;
147 146
148 NotificationRegistrar notification_registrar_; 147 NotificationRegistrar notification_registrar_;
149 148
150 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService); 149 DISALLOW_COPY_AND_ASSIGN(DesktopNotificationService);
151 }; 150 };
152 151
153 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_ 152 #endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698