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

Unified Diff: chrome/browser/notifications/notification_ui_manager_android.h

Issue 247943003: Allow compiling Android with notifications=1, add stubbed UI manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments 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_android.h
diff --git a/chrome/browser/notifications/notification_ui_manager_android.h b/chrome/browser/notifications/notification_ui_manager_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ec387fdf55162112e5ca8c71de34b09343ea5e8
--- /dev/null
+++ b/chrome/browser/notifications/notification_ui_manager_android.h
@@ -0,0 +1,35 @@
+// Copyright 2014 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.
+
+#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_
+#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_
+
+#include "chrome/browser/notifications/notification_ui_manager.h"
+
+// Implementation of the Notification UI Manager for Android, which defers to
+// the Android framework for displaying notifications.
+class NotificationUIManagerAndroid : public NotificationUIManager {
+ public:
+ NotificationUIManagerAndroid();
+ virtual ~NotificationUIManagerAndroid();
+
+ // NotificationUIManager implementation;
+ virtual void Add(const Notification& notification, Profile* profile) OVERRIDE;
+ virtual bool Update(const Notification& notification,
+ Profile* profile) OVERRIDE;
+ virtual const Notification* FindById(
+ const std::string& notification_id) const OVERRIDE;
+ virtual bool CancelById(const std::string& notification_id) OVERRIDE;
+ virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin(
+ Profile* profile,
+ const GURL& source) OVERRIDE;
+ virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE;
+ virtual bool CancelAllByProfile(Profile* profile) OVERRIDE;
+ virtual void CancelAll() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerAndroid);
+};
+
+#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698