OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_APP_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 | 15 |
| 16 namespace extensions { |
| 17 |
16 // This class is used to represent a notification for an installed app, to be | 18 // This class is used to represent a notification for an installed app, to be |
17 // displayed on the New Tab Page. | 19 // displayed on the New Tab Page. |
18 class AppNotification { | 20 class AppNotification { |
19 public: | 21 public: |
20 // Creates an instance with the given properties. | 22 // Creates an instance with the given properties. |
21 // If |is_local| is true, notification is not synced. | 23 // If |is_local| is true, notification is not synced. |
22 // If |guid| is empty, a new guid is automatically created. | 24 // If |guid| is empty, a new guid is automatically created. |
23 AppNotification(bool is_local, | 25 AppNotification(bool is_local, |
24 const base::Time& creation_time, | 26 const base::Time& creation_time, |
25 const std::string& guid, | 27 const std::string& guid, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 }; | 79 }; |
78 | 80 |
79 // A list of AppNotification's. | 81 // A list of AppNotification's. |
80 typedef std::vector<linked_ptr<AppNotification> > AppNotificationList; | 82 typedef std::vector<linked_ptr<AppNotification> > AppNotificationList; |
81 | 83 |
82 // A way to copy an AppNotificationList, which uses AppNotification::Copy on | 84 // A way to copy an AppNotificationList, which uses AppNotification::Copy on |
83 // each element. | 85 // each element. |
84 // Caller owns the returned instance. | 86 // Caller owns the returned instance. |
85 AppNotificationList* CopyAppNotificationList(const AppNotificationList& source); | 87 AppNotificationList* CopyAppNotificationList(const AppNotificationList& source); |
86 | 88 |
| 89 } // namespace extensions |
| 90 |
87 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_ | 91 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_H_ |
OLD | NEW |