Chromium Code Reviews| 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..b8ebb13db35fe963c58c12175aece76fdbfc5c7b |
| --- /dev/null |
| +++ b/chrome/browser/notifications/notification_operation_common.h |
| @@ -0,0 +1,35 @@ |
| +// 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 |
| +namespace content { |
| +class BrowserContext; |
| +} // namespace content |
| + |
| +namespace notification_operation_common { |
| + |
| +// Possible kinds of notifications |
| +enum NotificationHandlerType { |
| + PERSISTENT_NOTIFICATION = 0, |
| + INPAGE_NOTIFICATION = 1, |
| + NOTIFICATION_HANDLER_TYPE_LAST = INPAGE_NOTIFICATION |
|
Peter Beverloo
2016/06/29 00:23:16
Why do you call this _LAST, but the enum eight lin
Miguel Garcia
2016/07/05 13:54:50
Done.
|
| +}; |
| + |
| +// Things a user can do to a notification. |
| +enum NotificationOperation { |
| + NOTIFICATION_CLICK = 0, |
| + NOTIFICATION_CLOSE = 1, |
| + NOTIFICATION_SETTINGS = 2, |
| + NOTIFICATION_OPERATION_MAX = NOTIFICATION_SETTINGS |
| +}; |
| + |
| +// Open the Notification settings screen when clicking the right button. |
| +void OpenNotificationSettings(content::BrowserContext* browser_context); |
| + |
| +} // namespace notification_operation_common |
| + |
| +#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OPERATION_COMMON_H_ |