Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1750)

Unified Diff: chrome/browser/notifications/notification_ui_manager.cc

Issue 247943003: Allow compiling Android with notifications=1, add stubbed UI manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/notification_ui_manager.cc
diff --git a/chrome/browser/notifications/notification_ui_manager.cc b/chrome/browser/notifications/notification_ui_manager.cc
index eae219d3e755c717c5dac8aab6d2afa06a6733c2..5109d34993469ba11a5b8a2c8a8d386b1e1e6939 100644
--- a/chrome/browser/notifications/notification_ui_manager.cc
+++ b/chrome/browser/notifications/notification_ui_manager.cc
@@ -13,8 +13,17 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "ui/message_center/message_center_util.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/notifications/notification_ui_manager_android.h"
+#endif
+
// static
NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
+#if defined(OS_ANDROID)
+ // Chrome for Android defers to the Android framework for displaying
+ // notifications, and thus doesn't use the message center.
+ return new NotificationUIManagerAndroid();
+#else
ProfileInfoCache* profile_info_cache =
&g_browser_process->profile_manager()->GetProfileInfoCache();
scoped_ptr<message_center::NotifierSettingsProvider> settings_provider(
@@ -23,4 +32,5 @@ NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) {
g_browser_process->message_center(),
local_state,
settings_provider.Pass());
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698