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