Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ |
| 7 | 7 |
| 8 namespace content { | 8 namespace content { |
| 9 class BrowserContext; | 9 class BrowserContext; |
| 10 } // namespace content | 10 } // namespace content |
| 11 | 11 |
| 12 // Shared functionality for both in page and persistent notification | 12 // Shared functionality for both in page and persistent notification |
| 13 class NotificationCommon { | 13 class NotificationCommon { |
| 14 public: | 14 public: |
| 15 // Things as user can do to a notification. | 15 // Things as user can do to a notification. |
| 16 // TODO(peter): Prefix these options with OPERATION_. | |
|
Miguel Garcia
2017/02/21 10:56:44
FWIW we discussed this during the initial review a
Peter Beverloo
2017/02/21 17:23:50
We didn't use the prefix when we used `enum classe
| |
| 16 enum Operation { | 17 enum Operation { |
| 17 CLICK = 0, | 18 CLICK = 0, |
| 18 CLOSE = 1, | 19 CLOSE = 1, |
| 19 SETTINGS = 2, | 20 SETTINGS = 2, |
| 20 OPERATION_MAX = SETTINGS | 21 OPERATION_MAX = SETTINGS |
| 21 }; | 22 }; |
| 22 | 23 |
| 23 // Possible kinds of notifications | 24 // Possible kinds of notifications |
| 25 // TODO(peter): Prefix these options with TYPE_. | |
| 24 enum Type { | 26 enum Type { |
| 25 PERSISTENT = 0, | 27 PERSISTENT = 0, |
| 26 NON_PERSISTENT = 1, | 28 NON_PERSISTENT = 1, |
| 27 TYPE_MAX = NON_PERSISTENT | 29 EXTENSION = 2, |
| 30 TYPE_MAX = EXTENSION | |
| 28 }; | 31 }; |
| 29 | 32 |
| 30 // Open the Notification settings screen when clicking the right button. | 33 // Open the Notification settings screen when clicking the right button. |
| 31 // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy | 34 // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy |
| 32 // is updated. | 35 // is updated. |
| 33 static void OpenNotificationSettings( | 36 static void OpenNotificationSettings( |
| 34 content::BrowserContext* browser_context); | 37 content::BrowserContext* browser_context); |
| 35 }; | 38 }; |
| 36 | 39 |
| 37 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ | 40 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ |
| OLD | NEW |