OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/notifications/balloon_host.h" |
| 6 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 7 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 8 #include "chrome/browser/notifications/notification.h" |
| 9 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 10 #include "chrome/browser/notifications/notifications_prefs_cache.h" |
| 11 #include "chrome/browser/prefs/pref_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 14 #include "chrome/common/pref_names.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" |
| 16 |
| 17 ////////////////////////// NotificationUIManager ////////////////////////////// |
| 18 |
| 19 // static |
| 20 NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { |
| 21 return new NotificationUIManager(local_state); |
| 22 } |
| 23 |
| 24 NotificationUIManager::NotificationUIManager(PrefService* local_state) { |
| 25 } |
| 26 |
| 27 NotificationUIManager::~NotificationUIManager() { |
| 28 } |
| 29 |
| 30 // static |
| 31 void NotificationUIManager::RegisterPrefs(PrefService* prefs) { |
| 32 } |
| 33 |
| 34 void NotificationUIManager::Observe(NotificationType type, |
| 35 const NotificationSource& source, |
| 36 const NotificationDetails& details) { |
| 37 } |
| 38 |
| 39 void NotificationUIManager::Add(const Notification& notification, |
| 40 Profile* profile) { |
| 41 } |
| 42 |
| 43 bool NotificationUIManager::CancelById(const std::string& notification_id) { |
| 44 return true; |
| 45 } |
| 46 |
| 47 bool NotificationUIManager::CancelAllBySourceOrigin(const GURL& source_origin) { |
| 48 return true; |
| 49 } |
| 50 |
| 51 void NotificationUIManager::OnBalloonSpaceChanged() { |
| 52 } |
| 53 |
| 54 /////////////////////////// DesktopNotificationService //////////////////////// |
| 55 |
| 56 DesktopNotificationService::DesktopNotificationService(Profile* profile, |
| 57 NotificationUIManager* ui_manager) { |
| 58 } |
| 59 |
| 60 DesktopNotificationService::~DesktopNotificationService() { |
| 61 } |
| 62 |
| 63 void DesktopNotificationService::RequestPermission( |
| 64 const GURL& origin, int process_id, int route_id, int callback_context, |
| 65 TabContents* tab) { |
| 66 } |
| 67 |
| 68 void DesktopNotificationService::RegisterUserPrefs(PrefService* user_prefs) { |
| 69 content_settings::NotificationProvider::RegisterUserPrefs(user_prefs); |
| 70 } |
| 71 |
| 72 void DesktopNotificationService::GrantPermission(const GURL& origin) { |
| 73 } |
| 74 |
| 75 void DesktopNotificationService::DenyPermission(const GURL& origin) { |
| 76 } |
| 77 |
| 78 void DesktopNotificationService::Observe(NotificationType type, |
| 79 const NotificationSource& source, |
| 80 const NotificationDetails& details) { |
| 81 } |
| 82 |
| 83 ContentSetting DesktopNotificationService::GetDefaultContentSetting() { |
| 84 return CONTENT_SETTING_DEFAULT; |
| 85 } |
| 86 |
| 87 void DesktopNotificationService::SetDefaultContentSetting( |
| 88 ContentSetting setting) { |
| 89 } |
| 90 |
| 91 bool DesktopNotificationService::IsDefaultContentSettingManaged() const { |
| 92 return false; |
| 93 } |
| 94 |
| 95 std::vector<GURL> DesktopNotificationService::GetAllowedOrigins() { |
| 96 return std::vector<GURL>(); |
| 97 } |
| 98 |
| 99 std::vector<GURL> DesktopNotificationService::GetBlockedOrigins() { |
| 100 return std::vector<GURL>(); |
| 101 } |
| 102 |
| 103 void DesktopNotificationService::ResetAllowedOrigin(const GURL& origin) { |
| 104 } |
| 105 |
| 106 void DesktopNotificationService::ResetBlockedOrigin(const GURL& origin) { |
| 107 } |
| 108 |
| 109 int DesktopNotificationService::HasPermission(const GURL& origin) { |
| 110 return WebKit::WebNotificationPresenter::PermissionNotAllowed; |
| 111 } |
| 112 |
| 113 // static |
| 114 DesktopNotificationService* DesktopNotificationServiceFactory::GetForProfile( |
| 115 Profile* profile) { |
| 116 return NULL; |
| 117 } |
| 118 |
| 119 // static |
| 120 string16 DesktopNotificationService::CreateDataUrl( |
| 121 const GURL& icon_url, |
| 122 const string16& title, |
| 123 const string16& body, |
| 124 WebKit::WebTextDirection dir) { |
| 125 return string16(); |
| 126 } |
| 127 |
| 128 ///////////////////// DesktopNotificationServiceFactory /////////////////////// |
| 129 |
| 130 // static |
| 131 DesktopNotificationServiceFactory* DesktopNotificationServiceFactory:: |
| 132 GetInstance() { |
| 133 return Singleton<DesktopNotificationServiceFactory>::get(); |
| 134 } |
| 135 |
| 136 DesktopNotificationServiceFactory::DesktopNotificationServiceFactory() |
| 137 : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) { |
| 138 } |
| 139 |
| 140 DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() { |
| 141 } |
| 142 |
| 143 ProfileKeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor( |
| 144 Profile* profile) const { |
| 145 return NULL; |
| 146 } |
| 147 |
| 148 bool DesktopNotificationServiceFactory::ServiceHasOwnInstanceInIncognito() { |
| 149 return true; |
| 150 } |
| 151 |
| 152 /////////////////////////////////// BalloonHost /////////////////////////////// |
| 153 |
| 154 // static |
| 155 bool BalloonHost::IsRenderViewReady() const { |
| 156 return true; |
| 157 } |
| 158 |
| 159 //////////////////////////// NotificationsPrefsCache ////////////////////////// |
| 160 |
| 161 // static |
| 162 void NotificationsPrefsCache::ListValueToGurlVector( |
| 163 const ListValue& origin_list, |
| 164 std::vector<GURL>* origin_vector) { |
| 165 } |
| 166 |
| 167 |
| 168 Notification::Notification(const GURL& origin_url, |
| 169 const GURL& content_url, |
| 170 const string16& display_source, |
| 171 const string16& replace_id, |
| 172 NotificationDelegate* delegate) { |
| 173 } |
| 174 |
| 175 Notification::~Notification() { |
| 176 } |
OLD | NEW |