Commit 7f2b242b authored by jam@chromium.org's avatar jam@chromium.org

Revert stubs that were added in r88040. We need proper interfaces around...

Revert stubs that were added in r88040.  We need proper interfaces around features that need to be compiled out, instead of adding stubs.
Review URL: http://codereview.chromium.org/7046052

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88374 0039d316-1c4b-4281-b951-d872f2087c98
parent 0a5bdc65
...@@ -443,9 +443,6 @@ ...@@ -443,9 +443,6 @@
# Point to ICU directory. # Point to ICU directory.
'icu_src_dir': '../third_party/icu', 'icu_src_dir': '../third_party/icu',
# Enable desktop notifications.
'enable_desktop_notifications%': 1,
'conditions': [ 'conditions': [
['os_posix==1 and OS!="mac"', { ['os_posix==1 and OS!="mac"', {
# This will set gcc_version to XY if you are running gcc X.Y.*. # This will set gcc_version to XY if you are running gcc X.Y.*.
......
// 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() {
}
// 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;
}
...@@ -1467,7 +1467,6 @@ ...@@ -1467,7 +1467,6 @@
'browser/notifications/notification_object_proxy.h', 'browser/notifications/notification_object_proxy.h',
'browser/notifications/notification_options_menu_model.cc', 'browser/notifications/notification_options_menu_model.cc',
'browser/notifications/notification_options_menu_model.h', 'browser/notifications/notification_options_menu_model.h',
'browser/notifications/notification_stubs.cc',
'browser/notifications/notification_ui_manager.cc', 'browser/notifications/notification_ui_manager.cc',
'browser/notifications/notification_ui_manager.h', 'browser/notifications/notification_ui_manager.h',
'browser/notifications/notifications_prefs_cache.cc', 'browser/notifications/notifications_prefs_cache.cc',
...@@ -2100,7 +2099,6 @@ ...@@ -2100,7 +2099,6 @@
'browser/task_manager/task_manager.cc', 'browser/task_manager/task_manager.cc',
'browser/task_manager/task_manager.h', 'browser/task_manager/task_manager.h',
'browser/task_manager/task_manager_notification_resource_provider.cc', '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.cc',
'browser/task_manager/task_manager_resource_providers.h', 'browser/task_manager/task_manager_resource_providers.h',
'browser/themes/browser_theme_pack.cc', 'browser/themes/browser_theme_pack.cc',
...@@ -4461,22 +4459,6 @@ ...@@ -4461,22 +4459,6 @@
['exclude', '^browser/ui/views/file_manager_dialog.h'], ['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',
]
}],
], ],
}, },
{ {
......
...@@ -1470,6 +1470,11 @@ ...@@ -1470,6 +1470,11 @@
'browser/net/sqlite_persistent_cookie_store_unittest.cc', 'browser/net/sqlite_persistent_cookie_store_unittest.cc',
'browser/net/url_fixer_upper_unittest.cc', 'browser/net/url_fixer_upper_unittest.cc',
'browser/net/url_info_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/parsers/metadata_parser_filebase_unittest.cc',
'browser/password_manager/encryptor_password_mac_unittest.cc', 'browser/password_manager/encryptor_password_mac_unittest.cc',
'browser/password_manager/encryptor_unittest.cc', 'browser/password_manager/encryptor_unittest.cc',
...@@ -1751,6 +1756,7 @@ ...@@ -1751,6 +1756,7 @@
'browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm', 'browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm',
'browser/ui/cocoa/menu_button_unittest.mm', 'browser/ui/cocoa/menu_button_unittest.mm',
'browser/ui/cocoa/menu_controller_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/nsimage_cache_unittest.mm',
'browser/ui/cocoa/nsmenuitem_additions_unittest.mm', 'browser/ui/cocoa/nsmenuitem_additions_unittest.mm',
'browser/ui/cocoa/objc_method_swizzle_unittest.mm', 'browser/ui/cocoa/objc_method_swizzle_unittest.mm',
...@@ -1997,16 +2003,6 @@ ...@@ -1997,16 +2003,6 @@
'../webkit/fileapi/file_system_test_helper.h', '../webkit/fileapi/file_system_test_helper.h',
], ],
'conditions': [ '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', { ['p2p_apis==1', {
'sources': [ 'sources': [
'../content/browser/renderer_host/p2p/socket_host_test_utils.h', '../content/browser/renderer_host/p2p/socket_host_test_utils.h',
...@@ -2382,6 +2378,7 @@ ...@@ -2382,6 +2378,7 @@
'browser/extensions/extension_context_menu_browsertest.cc', 'browser/extensions/extension_context_menu_browsertest.cc',
'browser/extensions/extension_cookies_apitest.cc', 'browser/extensions/extension_cookies_apitest.cc',
'browser/extensions/extension_cookies_unittest.cc', 'browser/extensions/extension_cookies_unittest.cc',
'browser/extensions/extension_crash_recovery_browsertest.cc',
'browser/extensions/extension_debugger_apitest.cc', 'browser/extensions/extension_debugger_apitest.cc',
'browser/extensions/extension_decode_jpeg_apitest.cc', 'browser/extensions/extension_decode_jpeg_apitest.cc',
'browser/extensions/extension_fileapi_apitest.cc', 'browser/extensions/extension_fileapi_apitest.cc',
...@@ -2429,6 +2426,7 @@ ...@@ -2429,6 +2426,7 @@
'browser/extensions/extension_webstore_private_apitest.cc', 'browser/extensions/extension_webstore_private_apitest.cc',
'browser/extensions/extension_webstore_private_browsertest.cc', 'browser/extensions/extension_webstore_private_browsertest.cc',
'browser/extensions/isolated_app_apitest.cc', 'browser/extensions/isolated_app_apitest.cc',
'browser/extensions/notifications_apitest.cc',
'browser/extensions/page_action_apitest.cc', 'browser/extensions/page_action_apitest.cc',
'browser/extensions/permissions_apitest.cc', 'browser/extensions/permissions_apitest.cc',
'browser/extensions/stubs_apitest.cc', 'browser/extensions/stubs_apitest.cc',
...@@ -2458,6 +2456,7 @@ ...@@ -2458,6 +2456,7 @@
'browser/speech/speech_input_bubble_browsertest.cc', 'browser/speech/speech_input_bubble_browsertest.cc',
'browser/ssl/ssl_browser_tests.cc', 'browser/ssl/ssl_browser_tests.cc',
'browser/task_manager/task_manager_browsertest.cc', 'browser/task_manager/task_manager_browsertest.cc',
'browser/task_manager/task_manager_notification_browsertest.cc',
'browser/translate/translate_manager_browsertest.cc', 'browser/translate/translate_manager_browsertest.cc',
'browser/ui/browser_init_browsertest.cc', 'browser/ui/browser_init_browsertest.cc',
'browser/ui/browser_navigator_browsertest.cc', 'browser/ui/browser_navigator_browsertest.cc',
...@@ -2681,13 +2680,6 @@ ...@@ -2681,13 +2680,6 @@
'../webkit/webkit.gyp:copy_npapi_test_plugin', '../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 ], # conditions
}, # target browser_tests }, # target browser_tests
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment