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

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

Issue 942103003: Handle notification preferences intent from gear icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 5 years, 10 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
index edaa97a2aaaab0e2fbd0367ae8738ebe03ab4686..a38172c4df29c67a4d195adeb4f80587bbe7bdbe 100644
--- a/chrome/browser/notifications/notification_ui_manager_android.h
+++ b/chrome/browser/notifications/notification_ui_manager_android.h
@@ -11,6 +11,7 @@
#include <string>
#include "base/android/scoped_java_ref.h"
+#include "base/strings/string16.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
class ProfileNotification;
@@ -52,6 +53,17 @@ class NotificationUIManagerAndroid : public NotificationUIManager {
static bool RegisterNotificationUIManager(JNIEnv* env);
private:
+ // Holds all information required to show or close a platform notification.
+ struct RegeneratedNotificationInfo {
+ RegeneratedNotificationInfo(const base::string16& tag,
+ int platform_id,
+ const std::string& origin)
+ : tag(tag), platform_id(platform_id), origin(origin) {}
+ base::string16 tag;
+ int platform_id;
+ std::string origin;
+ };
+
// Closes the Notification as displayed on the Android system.
void PlatformCloseNotification(const std::string& notification_id);
@@ -67,8 +79,9 @@ class NotificationUIManagerAndroid : public NotificationUIManager {
// Map from a notification id to the associated ProfileNotification*.
std::map<std::string, ProfileNotification*> profile_notifications_;
- // Map from notification id to the associated platform Id.
- std::map<std::string, int> platform_notifications_;
+ // Map from notification id to RegeneratedNotificationInfo.
+ std::map<std::string, RegeneratedNotificationInfo>
+ regenerated_notification_infos_;
base::android::ScopedJavaGlobalRef<jobject> java_object_;

Powered by Google App Engine
This is Rietveld 408576698