Home | History | Annotate | Download | only in browser
      1 // Copyright 2013 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.
      4 
      5 #include "apps/shell/browser/shell_app_sorting.h"
      6 
      7 #include "sync/api/string_ordinal.h"
      8 
      9 namespace {
     10 
     11 // Ordinals for a single app on a single page.
     12 const char kFirstApp[] = "a";
     13 const char kNextApp[] = "b";
     14 const char kFirstPage[] = "a";
     15 
     16 }  // namespace
     17 
     18 namespace apps {
     19 
     20 ShellAppSorting::ShellAppSorting() {
     21 }
     22 
     23 ShellAppSorting::~ShellAppSorting() {
     24 }
     25 
     26 void ShellAppSorting::SetExtensionScopedPrefs(
     27     extensions::ExtensionScopedPrefs* prefs) {
     28 }
     29 
     30 void ShellAppSorting::SetExtensionSyncService(
     31     ExtensionSyncService* extension_sync_service) {
     32 }
     33 
     34 void ShellAppSorting::Initialize(
     35     const extensions::ExtensionIdList& extension_ids) {
     36 }
     37 
     38 void ShellAppSorting::FixNTPOrdinalCollisions() {
     39 }
     40 
     41 void ShellAppSorting::EnsureValidOrdinals(
     42     const std::string& extension_id,
     43     const syncer::StringOrdinal& suggested_page) {
     44 }
     45 
     46 void ShellAppSorting::OnExtensionMoved(
     47     const std::string& moved_extension_id,
     48     const std::string& predecessor_extension_id,
     49     const std::string& successor_extension_id) {
     50 }
     51 
     52 syncer::StringOrdinal ShellAppSorting::GetAppLaunchOrdinal(
     53     const std::string& extension_id) const {
     54   return syncer::StringOrdinal(kFirstApp);
     55 }
     56 
     57 void ShellAppSorting::SetAppLaunchOrdinal(
     58     const std::string& extension_id,
     59     const syncer::StringOrdinal& new_app_launch_ordinal) {
     60 }
     61 
     62 syncer::StringOrdinal ShellAppSorting::CreateFirstAppLaunchOrdinal(
     63     const syncer::StringOrdinal& page_ordinal) const {
     64   return syncer::StringOrdinal(kFirstApp);
     65 }
     66 
     67 syncer::StringOrdinal ShellAppSorting::CreateNextAppLaunchOrdinal(
     68     const syncer::StringOrdinal& page_ordinal) const {
     69   return syncer::StringOrdinal(kNextApp);
     70 }
     71 
     72 syncer::StringOrdinal ShellAppSorting::CreateFirstAppPageOrdinal() const {
     73   return syncer::StringOrdinal(kFirstPage);
     74 }
     75 
     76 syncer::StringOrdinal ShellAppSorting::GetNaturalAppPageOrdinal() const {
     77   return syncer::StringOrdinal(kFirstPage);
     78 }
     79 
     80 syncer::StringOrdinal ShellAppSorting::GetPageOrdinal(
     81     const std::string& extension_id) const {
     82   return syncer::StringOrdinal(kFirstPage);
     83 }
     84 
     85 void ShellAppSorting::SetPageOrdinal(
     86     const std::string& extension_id,
     87     const syncer::StringOrdinal& new_page_ordinal) {
     88 }
     89 
     90 void ShellAppSorting::ClearOrdinals(const std::string& extension_id) {
     91 }
     92 
     93 int ShellAppSorting::PageStringOrdinalAsInteger(
     94     const syncer::StringOrdinal& page_ordinal) const {
     95   return 0;
     96 }
     97 
     98 syncer::StringOrdinal ShellAppSorting::PageIntegerAsStringOrdinal(
     99     size_t page_index) {
    100   return syncer::StringOrdinal(kFirstPage);
    101 }
    102 
    103 void ShellAppSorting::MarkExtensionAsHidden(
    104     const std::string& extension_id) {
    105 }
    106 
    107 }  // namespace apps
    108