OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_SHELL_BROWSER_SHELL_APP_SORTING_H_ | 5 #ifndef EXTENSIONS_BROWSER_NULL_APP_SORTING_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_APP_SORTING_H_ | 6 #define EXTENSIONS_BROWSER_NULL_APP_SORTING_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
9 #include "extensions/browser/app_sorting.h" | 10 #include "extensions/browser/app_sorting.h" |
10 | 11 |
11 namespace extensions { | 12 namespace extensions { |
12 | 13 |
13 // A stub AppSorting. Since app_shell only runs a single app we don't need to | 14 // An AppSorting that doesn't provide any ordering. |
14 // sort them. | 15 class NullAppSorting : public AppSorting { |
15 class ShellAppSorting : public AppSorting { | |
16 public: | 16 public: |
17 ShellAppSorting(); | 17 NullAppSorting(); |
18 virtual ~ShellAppSorting(); | 18 virtual ~NullAppSorting(); |
19 | 19 |
20 // AppSorting overrides: | 20 // AppSorting overrides: |
21 virtual void SetExtensionScopedPrefs(ExtensionScopedPrefs* prefs) OVERRIDE; | 21 virtual void SetExtensionScopedPrefs(ExtensionScopedPrefs* prefs) OVERRIDE; |
22 virtual void SetExtensionSyncService( | 22 virtual void SetExtensionSyncService( |
23 ExtensionSyncService* extension_sync_service) OVERRIDE; | 23 ExtensionSyncService* extension_sync_service) OVERRIDE; |
24 virtual void Initialize(const ExtensionIdList& extension_ids) OVERRIDE; | 24 virtual void Initialize(const ExtensionIdList& extension_ids) OVERRIDE; |
25 virtual void FixNTPOrdinalCollisions() OVERRIDE; | 25 virtual void FixNTPOrdinalCollisions() OVERRIDE; |
26 virtual void EnsureValidOrdinals( | 26 virtual void EnsureValidOrdinals( |
27 const std::string& extension_id, | 27 const std::string& extension_id, |
28 const syncer::StringOrdinal& suggested_page) OVERRIDE; | 28 const syncer::StringOrdinal& suggested_page) OVERRIDE; |
(...skipping 19 matching lines...) Expand all Loading... |
48 const syncer::StringOrdinal& new_page_ordinal) OVERRIDE; | 48 const syncer::StringOrdinal& new_page_ordinal) OVERRIDE; |
49 virtual void ClearOrdinals(const std::string& extension_id) OVERRIDE; | 49 virtual void ClearOrdinals(const std::string& extension_id) OVERRIDE; |
50 virtual int PageStringOrdinalAsInteger( | 50 virtual int PageStringOrdinalAsInteger( |
51 const syncer::StringOrdinal& page_ordinal) const OVERRIDE; | 51 const syncer::StringOrdinal& page_ordinal) const OVERRIDE; |
52 virtual syncer::StringOrdinal PageIntegerAsStringOrdinal( | 52 virtual syncer::StringOrdinal PageIntegerAsStringOrdinal( |
53 size_t page_index) OVERRIDE; | 53 size_t page_index) OVERRIDE; |
54 virtual void SetExtensionVisible(const std::string& extension_id, | 54 virtual void SetExtensionVisible(const std::string& extension_id, |
55 bool visible) OVERRIDE; | 55 bool visible) OVERRIDE; |
56 | 56 |
57 private: | 57 private: |
58 DISALLOW_COPY_AND_ASSIGN(ShellAppSorting); | 58 DISALLOW_COPY_AND_ASSIGN(NullAppSorting); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace extensions | 61 } // namespace extensions |
62 | 62 |
63 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_SORTING_H_ | 63 #endif // EXTENSIONS_BROWSER_NULL_APP_SORTING_H_ |
OLD | NEW |