diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 13:07:38 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 13:07:38 +0000 |
commit | d6ec84afaa637fb057ad1cbf5a7c03b02b6a456c (patch) | |
tree | 8b0e7c2d2a8ace6fa88a2eca6901564156cea539 /extensions/common/extension_api_stub.cc | |
parent | 62f9063b7cb9bc8cc3bc1aa5ebe19a5d216a54cf (diff) | |
download | chromium_src-d6ec84afaa637fb057ad1cbf5a7c03b02b6a456c.zip chromium_src-d6ec84afaa637fb057ad1cbf5a7c03b02b6a456c.tar.gz chromium_src-d6ec84afaa637fb057ad1cbf5a7c03b02b6a456c.tar.bz2 |
Moved extension_api to src/extensions/common
This is part of the move of extensions code into the extensions
component. This change does not move the generated API data and API
resources.
TBR=darin@chromium.org
BUG=162530
Review URL: https://codereview.chromium.org/50743005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/extension_api_stub.cc')
-rw-r--r-- | extensions/common/extension_api_stub.cc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/extensions/common/extension_api_stub.cc b/extensions/common/extension_api_stub.cc new file mode 100644 index 0000000..e323436 --- /dev/null +++ b/extensions/common/extension_api_stub.cc @@ -0,0 +1,48 @@ +// 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, ""); +} + +bool ExtensionAPI::IsAnyFeatureAvailableToContext(const std::string& api_name, + 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 |