| 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 COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
| 7 | 7 |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 namespace ntp_snippets { | 10 namespace ntp_snippets { |
| 11 | 11 |
| 12 class CategoryFactory; | 12 class CategoryFactory; |
| 13 | 13 |
| 14 // These are the categories that the client knows about. | 14 // These are the categories that the client knows about. |
| 15 // The values before LOCAL_CATEGORIES_COUNT are the categories that are provided | 15 // The values before LOCAL_CATEGORIES_COUNT are the categories that are provided |
| 16 // locally on the device. Categories provided by the server (IDs strictly larger | 16 // locally on the device. Categories provided by the server (IDs strictly larger |
| 17 // than REMOTE_CATEGORIES_OFFSET) only need to be hard-coded here if they need | 17 // than REMOTE_CATEGORIES_OFFSET) only need to be hard-coded here if they need |
| 18 // to be recognized by the client implementation. | 18 // to be recognized by the client implementation. |
| 19 // On Android builds, a Java counterpart will be generated for this enum. | 19 // On Android builds, a Java counterpart will be generated for this enum. |
| 20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets | 20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets |
| 21 enum class KnownCategories { | 21 enum class KnownCategories { |
| 22 // Pages downloaded for offline consumption. | 22 // Pages downloaded for offline consumption. |
| 23 OFFLINE_PAGES, | 23 OFFLINE_PAGES, |
| 24 | 24 |
| 25 // Recently used bookmarks. | 25 // Recently used bookmarks. |
| 26 BOOKMARKS, | 26 BOOKMARKS, |
| 27 | 27 |
| 28 // Physical Web page available in the vicinity. |
| 29 PHYSICAL_WEB_PAGES, |
| 30 |
| 28 // Follows the last local category. | 31 // Follows the last local category. |
| 29 LOCAL_CATEGORIES_COUNT, | 32 LOCAL_CATEGORIES_COUNT, |
| 30 | 33 |
| 31 REMOTE_CATEGORIES_OFFSET = 10000, | 34 REMOTE_CATEGORIES_OFFSET = 10000, |
| 32 | 35 |
| 33 // Articles for you. | 36 // Articles for you. |
| 34 ARTICLES, | 37 ARTICLES, |
| 35 }; | 38 }; |
| 36 | 39 |
| 37 // A category groups ContentSuggestions which belong together. Use the | 40 // A category groups ContentSuggestions which belong together. Use the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 59 | 62 |
| 60 bool operator==(const Category& left, const Category& right); | 63 bool operator==(const Category& left, const Category& right); |
| 61 | 64 |
| 62 bool operator!=(const Category& left, const Category& right); | 65 bool operator!=(const Category& left, const Category& right); |
| 63 | 66 |
| 64 std::ostream& operator<<(std::ostream& os, const Category& obj); | 67 std::ostream& operator<<(std::ostream& os, const Category& obj); |
| 65 | 68 |
| 66 } // namespace ntp_snippets | 69 } // namespace ntp_snippets |
| 67 | 70 |
| 68 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ | 71 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
| OLD | NEW |