summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension_api_stub.cc
blob: 0a2468ae7872262d5621383c9988d20802593dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Stub methods to be used when extensions are disabled
// i.e. ENABLE_EXTENSIONS is not defined

#include "extensions/common/extension_api.h"

#include "extensions/common/features/feature.h"

namespace extensions {

// static
ExtensionAPI* ExtensionAPI::GetSharedInstance() {
  return NULL;
}

// static
ExtensionAPI* ExtensionAPI::CreateWithDefaultConfiguration() {
  return NULL;
}

Feature::Availability ExtensionAPI::IsAvailable(
    const std::string& api_full_name,
    const Extension* extension,
    Feature::Context context,
    const GURL& url) {
  return Feature::CreateAvailability(Feature::NOT_PRESENT, "");
}

Feature::Availability ExtensionAPI::IsAvailable(
    const Feature& api,
    const Extension* extension,
    Feature::Context context,
    const GURL& url) {
  return Feature::CreateAvailability(Feature::NOT_PRESENT, "");
}

bool ExtensionAPI::IsAnyFeatureAvailableToContext(const Feature& api,
                                                  const Extension* extension,
                                                  Feature::Context context,
                                                  const GURL& url) {
  return false;
}

bool ExtensionAPI::IsPrivileged(const std::string& full_name) {
  return false;
}

const base::DictionaryValue* ExtensionAPI::GetSchema(
    const std::string& full_name) {
  return NULL;
}

}  // namespace extensions