summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi3
-rw-r--r--chrome/browser/notifications/notification_stubs.cc176
-rw-r--r--chrome/browser/task_manager/task_manager_notification_resource_provider_stub.cc11
-rw-r--r--chrome/chrome_browser.gypi18
-rw-r--r--chrome/chrome_tests.gypi26
5 files changed, 9 insertions, 225 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 1f323c3..06674f3 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -443,9 +443,6 @@
# Point to ICU directory.
'icu_src_dir': '../third_party/icu',
- # Enable desktop notifications.
- 'enable_desktop_notifications%': 1,
-
'conditions': [
['os_posix==1 and OS!="mac"', {
# This will set gcc_version to XY if you are running gcc X.Y.*.
diff --git a/chrome/browser/notifications/notification_stubs.cc b/chrome/browser/notifications/notification_stubs.cc
deleted file mode 100644
index bb2586d..0000000
--- a/chrome/browser/notifications/notification_stubs.cc
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/notifications/balloon_host.h"
-#include "chrome/browser/notifications/desktop_notification_service.h"
-#include "chrome/browser/notifications/desktop_notification_service_factory.h"
-#include "chrome/browser/notifications/notification.h"
-#include "chrome/browser/notifications/notification_ui_manager.h"
-#include "chrome/browser/notifications/notifications_prefs_cache.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/profiles/profile_dependency_manager.h"
-#include "chrome/common/pref_names.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h"
-
-////////////////////////// NotificationUIManager //////////////////////////////
-
-// static
-NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
- return new NotificationUIManager(local_state);
-}
-
-NotificationUIManager::NotificationUIManager(PrefService* local_state) {
-}
-
-NotificationUIManager::~NotificationUIManager() {
-}
-
-// static
-void NotificationUIManager::RegisterPrefs(PrefService* prefs) {
-}
-
-void NotificationUIManager::Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
-}
-
-void NotificationUIManager::Add(const Notification& notification,
- Profile* profile) {
-}
-
-bool NotificationUIManager::CancelById(const std::string& notification_id) {
- return true;
-}
-
-bool NotificationUIManager::CancelAllBySourceOrigin(const GURL& source_origin) {
- return true;
-}
-
-void NotificationUIManager::OnBalloonSpaceChanged() {
-}
-
-/////////////////////////// DesktopNotificationService ////////////////////////
-
-DesktopNotificationService::DesktopNotificationService(Profile* profile,
- NotificationUIManager* ui_manager) {
-}
-
-DesktopNotificationService::~DesktopNotificationService() {
-}
-
-void DesktopNotificationService::RequestPermission(
- const GURL& origin, int process_id, int route_id, int callback_context,
- TabContents* tab) {
-}
-
-void DesktopNotificationService::RegisterUserPrefs(PrefService* user_prefs) {
- content_settings::NotificationProvider::RegisterUserPrefs(user_prefs);
-}
-
-void DesktopNotificationService::GrantPermission(const GURL& origin) {
-}
-
-void DesktopNotificationService::DenyPermission(const GURL& origin) {
-}
-
-void DesktopNotificationService::Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
-}
-
-ContentSetting DesktopNotificationService::GetDefaultContentSetting() {
- return CONTENT_SETTING_DEFAULT;
-}
-
-void DesktopNotificationService::SetDefaultContentSetting(
- ContentSetting setting) {
-}
-
-bool DesktopNotificationService::IsDefaultContentSettingManaged() const {
- return false;
-}
-
-std::vector<GURL> DesktopNotificationService::GetAllowedOrigins() {
- return std::vector<GURL>();
-}
-
-std::vector<GURL> DesktopNotificationService::GetBlockedOrigins() {
- return std::vector<GURL>();
-}
-
-void DesktopNotificationService::ResetAllowedOrigin(const GURL& origin) {
-}
-
-void DesktopNotificationService::ResetBlockedOrigin(const GURL& origin) {
-}
-
-int DesktopNotificationService::HasPermission(const GURL& origin) {
- return WebKit::WebNotificationPresenter::PermissionNotAllowed;
-}
-
-// static
-DesktopNotificationService* DesktopNotificationServiceFactory::GetForProfile(
- Profile* profile) {
- return NULL;
-}
-
-// static
-string16 DesktopNotificationService::CreateDataUrl(
- const GURL& icon_url,
- const string16& title,
- const string16& body,
- WebKit::WebTextDirection dir) {
- return string16();
-}
-
-///////////////////// DesktopNotificationServiceFactory ///////////////////////
-
-// static
-DesktopNotificationServiceFactory* DesktopNotificationServiceFactory::
- GetInstance() {
- return Singleton<DesktopNotificationServiceFactory>::get();
-}
-
-DesktopNotificationServiceFactory::DesktopNotificationServiceFactory()
- : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) {
-}
-
-DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() {
-}
-
-ProfileKeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor(
- Profile* profile) const {
- return NULL;
-}
-
-bool DesktopNotificationServiceFactory::ServiceHasOwnInstanceInIncognito() {
- return true;
-}
-
-/////////////////////////////////// BalloonHost ///////////////////////////////
-
-// static
-bool BalloonHost::IsRenderViewReady() const {
- return true;
-}
-
-//////////////////////////// NotificationsPrefsCache //////////////////////////
-
-// static
-void NotificationsPrefsCache::ListValueToGurlVector(
- const ListValue& origin_list,
- std::vector<GURL>* origin_vector) {
-}
-
-
-Notification::Notification(const GURL& origin_url,
- const GURL& content_url,
- const string16& display_source,
- const string16& replace_id,
- NotificationDelegate* delegate) {
-}
-
-Notification::~Notification() {
-}
diff --git a/chrome/browser/task_manager/task_manager_notification_resource_provider_stub.cc b/chrome/browser/task_manager/task_manager_notification_resource_provider_stub.cc
deleted file mode 100644
index f6b9c31..0000000
--- a/chrome/browser/task_manager/task_manager_notification_resource_provider_stub.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/task_manager/task_manager_resource_providers.h"
-
-// static
-TaskManagerNotificationResourceProvider*
-TaskManagerNotificationResourceProvider::Create(TaskManager* task_manager) {
- return NULL;
-}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index fa02d73..69bbcdc 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1467,7 +1467,6 @@
'browser/notifications/notification_object_proxy.h',
'browser/notifications/notification_options_menu_model.cc',
'browser/notifications/notification_options_menu_model.h',
- 'browser/notifications/notification_stubs.cc',
'browser/notifications/notification_ui_manager.cc',
'browser/notifications/notification_ui_manager.h',
'browser/notifications/notifications_prefs_cache.cc',
@@ -2100,7 +2099,6 @@
'browser/task_manager/task_manager.cc',
'browser/task_manager/task_manager.h',
'browser/task_manager/task_manager_notification_resource_provider.cc',
- 'browser/task_manager/task_manager_notification_resource_provider_stub.cc',
'browser/task_manager/task_manager_resource_providers.cc',
'browser/task_manager/task_manager_resource_providers.h',
'browser/themes/browser_theme_pack.cc',
@@ -4461,22 +4459,6 @@
['exclude', '^browser/ui/views/file_manager_dialog.h'],
]}
],
- ['enable_desktop_notifications==0', {
- 'sources/': [
- ['exclude', '^browser/desktop_notification_handler.cc'],
- ['exclude', '^browser/notifications/'],
- ['exclude', '^browser/ui/cocoa/notifications/'],
- ['exclude', '^browser/ui/gtk/notifications/'],
- ['exclude', '^browser/ui/views/notifications/'],
- ['include', '^browser/notifications/notification_stubs.cc'],
- ['exclude', '^browser/task_manager/task_manager_notification_resource_provider.cc'],
- ]
- }, { # enable_desktop_notifications==0
- 'sources!': [
- 'browser/notifications/notification_stubs.cc',
- 'browser/task_manager/task_manager_notification_resource_provider_stub.cc',
- ]
- }],
],
},
{
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 282509d..d3e4b9c 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1470,6 +1470,11 @@
'browser/net/sqlite_persistent_cookie_store_unittest.cc',
'browser/net/url_fixer_upper_unittest.cc',
'browser/net/url_info_unittest.cc',
+ 'browser/notifications/desktop_notification_service_unittest.cc',
+ 'browser/notifications/desktop_notifications_unittest.cc',
+ 'browser/notifications/desktop_notifications_unittest.h',
+ 'browser/notifications/notification_exceptions_table_model_unittest.cc',
+ 'browser/notifications/notifications_prefs_cache_unittest.cc',
'browser/parsers/metadata_parser_filebase_unittest.cc',
'browser/password_manager/encryptor_password_mac_unittest.cc',
'browser/password_manager/encryptor_unittest.cc',
@@ -1751,6 +1756,7 @@
'browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm',
'browser/ui/cocoa/menu_button_unittest.mm',
'browser/ui/cocoa/menu_controller_unittest.mm',
+ 'browser/ui/cocoa/notifications/balloon_controller_unittest.mm',
'browser/ui/cocoa/nsimage_cache_unittest.mm',
'browser/ui/cocoa/nsmenuitem_additions_unittest.mm',
'browser/ui/cocoa/objc_method_swizzle_unittest.mm',
@@ -1997,16 +2003,6 @@
'../webkit/fileapi/file_system_test_helper.h',
],
'conditions': [
- ['enable_desktop_notifications==1', {
- 'sources': [
- 'browser/notifications/desktop_notification_service_unittest.cc',
- 'browser/notifications/desktop_notifications_unittest.cc',
- 'browser/notifications/desktop_notifications_unittest.h',
- 'browser/notifications/notification_exceptions_table_model_unittest.cc',
- 'browser/notifications/notifications_prefs_cache_unittest.cc',
- 'browser/ui/cocoa/notifications/balloon_controller_unittest.mm',
- ]
- }],
['p2p_apis==1', {
'sources': [
'../content/browser/renderer_host/p2p/socket_host_test_utils.h',
@@ -2382,6 +2378,7 @@
'browser/extensions/extension_context_menu_browsertest.cc',
'browser/extensions/extension_cookies_apitest.cc',
'browser/extensions/extension_cookies_unittest.cc',
+ 'browser/extensions/extension_crash_recovery_browsertest.cc',
'browser/extensions/extension_debugger_apitest.cc',
'browser/extensions/extension_decode_jpeg_apitest.cc',
'browser/extensions/extension_fileapi_apitest.cc',
@@ -2429,6 +2426,7 @@
'browser/extensions/extension_webstore_private_apitest.cc',
'browser/extensions/extension_webstore_private_browsertest.cc',
'browser/extensions/isolated_app_apitest.cc',
+ 'browser/extensions/notifications_apitest.cc',
'browser/extensions/page_action_apitest.cc',
'browser/extensions/permissions_apitest.cc',
'browser/extensions/stubs_apitest.cc',
@@ -2458,6 +2456,7 @@
'browser/speech/speech_input_bubble_browsertest.cc',
'browser/ssl/ssl_browser_tests.cc',
'browser/task_manager/task_manager_browsertest.cc',
+ 'browser/task_manager/task_manager_notification_browsertest.cc',
'browser/translate/translate_manager_browsertest.cc',
'browser/ui/browser_init_browsertest.cc',
'browser/ui/browser_navigator_browsertest.cc',
@@ -2681,13 +2680,6 @@
'../webkit/webkit.gyp:copy_npapi_test_plugin',
],
}],
- ['enable_desktop_notifications==1', {
- 'sources': [
- 'browser/extensions/extension_crash_recovery_browsertest.cc',
- 'browser/extensions/notifications_apitest.cc',
- 'browser/task_manager/task_manager_notification_browsertest.cc',
- ]
- }],
], # conditions
}, # target browser_tests
{