Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / extensions / browser / null_app_sorting.h
blob7a1ffae00549a61f97aae556226d80889fc460a2
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_NULL_APP_SORTING_H_
6 #define EXTENSIONS_BROWSER_NULL_APP_SORTING_H_
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "extensions/browser/app_sorting.h"
12 namespace extensions {
14 // An AppSorting that doesn't provide any ordering.
15 class NullAppSorting : public AppSorting {
16 public:
17 NullAppSorting();
18 ~NullAppSorting() override;
20 // AppSorting overrides:
21 void FixNTPOrdinalCollisions() override;
22 void EnsureValidOrdinals(
23 const std::string& extension_id,
24 const syncer::StringOrdinal& suggested_page) override;
25 void OnExtensionMoved(const std::string& moved_extension_id,
26 const std::string& predecessor_extension_id,
27 const std::string& successor_extension_id) override;
28 syncer::StringOrdinal GetAppLaunchOrdinal(
29 const std::string& extension_id) const override;
30 void SetAppLaunchOrdinal(
31 const std::string& extension_id,
32 const syncer::StringOrdinal& new_app_launch_ordinal) override;
33 syncer::StringOrdinal CreateFirstAppLaunchOrdinal(
34 const syncer::StringOrdinal& page_ordinal) const override;
35 syncer::StringOrdinal CreateNextAppLaunchOrdinal(
36 const syncer::StringOrdinal& page_ordinal) const override;
37 syncer::StringOrdinal CreateFirstAppPageOrdinal() const override;
38 syncer::StringOrdinal GetNaturalAppPageOrdinal() const override;
39 syncer::StringOrdinal GetPageOrdinal(
40 const std::string& extension_id) const override;
41 void SetPageOrdinal(const std::string& extension_id,
42 const syncer::StringOrdinal& new_page_ordinal) override;
43 void ClearOrdinals(const std::string& extension_id) override;
44 int PageStringOrdinalAsInteger(
45 const syncer::StringOrdinal& page_ordinal) const override;
46 syncer::StringOrdinal PageIntegerAsStringOrdinal(size_t page_index) override;
47 void SetExtensionVisible(const std::string& extension_id,
48 bool visible) override;
50 private:
51 DISALLOW_COPY_AND_ASSIGN(NullAppSorting);
54 } // namespace extensions
56 #endif // EXTENSIONS_BROWSER_NULL_APP_SORTING_H_