diff options
author | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 10:41:57 +0000 |
---|---|---|
committer | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 10:41:57 +0000 |
commit | 7cce32386c8c7b26ad4ea4d40714e4d23c59d71a (patch) | |
tree | ecfbbb10126ac7c618a24b9ad9f6a53f60cb24e3 | |
parent | 05aad2da76c3041ffa80c961e225aa12abfc1fc0 (diff) | |
download | chromium_src-7cce32386c8c7b26ad4ea4d40714e4d23c59d71a.zip chromium_src-7cce32386c8c7b26ad4ea4d40714e4d23c59d71a.tar.gz chromium_src-7cce32386c8c7b26ad4ea4d40714e4d23c59d71a.tar.bz2 |
Allow building without notification support.
BUG=None
TEST=Existing
Review URL: http://codereview.chromium.org/8396043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107708 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 8 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 15 | ||||
-rw-r--r-- | content/content_renderer.gypi | 6 | ||||
-rw-r--r-- | content/content_tests.gypi | 5 | ||||
-rw-r--r-- | content/renderer/render_view_impl.cc | 5 |
5 files changed, 39 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index 7236e93..cdd3d18 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -204,6 +204,9 @@ # Speech input is compiled in by default. Set to 0 to disable. 'input_speech%': 1, + # Notifications are compiled in by default. Set to 0 to disable. + 'notifications%' : 1, + # If this is set, the clang plugins used on the buildbot will be used. # Run tools/clang/scripts/update.sh to make sure they are compiled. # This causes 'clang_chrome_plugins_flags' to be set. @@ -398,6 +401,7 @@ 'configuration_policy%': '<(configuration_policy)', 'safe_browsing%': '<(safe_browsing)', 'input_speech%': '<(input_speech)', + 'notifications%': '<(notifications)', 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 'asan%': '<(asan)', 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)', @@ -672,6 +676,7 @@ 'configuration_policy%': 0, 'input_speech%': 0, 'java_bridge%': 1, + 'notifications%': 0, # Builds the gtest targets as a shared_library. # TODO(michaelbai): Use the fixed value 'shared_library' once it @@ -1035,6 +1040,9 @@ ['input_speech==1', { 'defines': ['ENABLE_INPUT_SPEECH'], }], + ['notifications==1', { + 'defines': ['ENABLE_NOTIFICATIONS'], + }], ['fastbuild!=0', { 'conditions': [ diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index d7c209c..41609e9 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -582,6 +582,11 @@ # See comment about the same line in chrome/chrome_tests.gypi. 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, }], # OS=="mac" + ['notifications==0', { + 'sources/': [ + ['exclude', '^browser/notifications/'], + ], + }], ['toolkit_views==1', { 'dependencies': [ '../views/views.gyp:views', @@ -1974,6 +1979,11 @@ ['exclude', '^browser/speech/'], ], }], + ['notifications==0', { + 'sources/': [ + ['exclude', '^browser/notifications/'], + ], + }], ['safe_browsing==1', { 'defines': [ 'ENABLE_SAFE_BROWSING', @@ -2675,6 +2685,11 @@ ['exclude', '^../content/browser/speech/'], ], }], + ['notifications==0', { + 'sources!': [ + 'browser/extensions/notifications_apitest.cc', + ], + }], ['safe_browsing==1', { 'defines': [ 'ENABLE_SAFE_BROWSING', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 0fb27b7..8ed9fa4 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -227,6 +227,12 @@ 'renderer/speech_input_dispatcher.h', ] }], + ['notifications==0', { + 'sources!': [ + 'renderer/notification_provider.cc', + 'renderer/active_notification_tracker.cc', + ], + }], ], 'dependencies': [ '../build/linux/system.gyp:gtk', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 5044aca..c8fb0eb 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -209,6 +209,11 @@ ['exclude', '^browser/speech/'], ] }], + ['notifications==0', { + 'sources!': [ + 'renderer/active_notification_tracker_unittest.cc', + ], + }], ['use_x11 == 1', { 'dependencies': [ '../build/linux/system.gyp:dbus', diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index ad9cf5e..749aa25 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -361,7 +361,12 @@ RenderViewImpl::RenderViewImpl(gfx::NativeViewId parent_hwnd, } intents_dispatcher_ = new IntentsDispatcher(this); + +#if defined(ENABLE_NOTIFICATIONS) notification_provider_ = new NotificationProvider(this); +#else + notification_provider_ = NULL; +#endif RenderThread::Get()->AddRoute(routing_id_, this); // Take a reference on behalf of the RenderThread. This will be balanced |