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

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

Issue 2095223002: Refactor notification operation functionality out of PNS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 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_operation_common.h
diff --git a/chrome/browser/notifications/notification_operation_common.h b/chrome/browser/notifications/notification_operation_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..9e8261ebf67818e8d6607f3b436236abf429bb26
--- /dev/null
+++ b/chrome/browser/notifications/notification_operation_common.h
@@ -0,0 +1,27 @@
+// Copyright 2016 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_OPERATION_COMMON_H_
+#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPERATION_COMMON_H_
+
+// A series of common operations for both in page and persistent notification
Peter Beverloo 2016/06/28 22:52:41 Remove. (A class-level comment would be appropriat
Miguel Garcia 2016/06/29 17:25:40 Acknowledged.
+namespace content {
+class BrowserContext;
+} // namespace content
+
+namespace notification_operation_common {
Peter Beverloo 2016/06/28 22:52:41 Please stash common behaviour like this in a class
Miguel Garcia 2016/06/29 17:25:40 Done.
+
+// Things you can do to a notification.
+enum NotificationOperation {
+ NOTIFICATION_CLICK = 0,
+ NOTIFICATION_CLOSE = 1,
+ NOTIFICATION_SETTINGS = 2
+};
+
+// Open the Notification settings screen when clicking the right button.
+void OpenNotificationSettings(content::BrowserContext* browser_context);
Peter Beverloo 2016/06/28 22:52:41 This should probably take a Profile* since it's no
Miguel Garcia 2016/06/29 17:25:40 Todo added but why exactly do we take a BrowserCon
+
+} // namespace notification_operation_common
+
+#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPERATION_COMMON_H_

Powered by Google App Engine
This is Rietveld 408576698