OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Stub methods to be used when extensions are disabled | 5 // Stub methods to be used when extensions are disabled |
6 // i.e. ENABLE_EXTENSIONS is not defined | 6 // i.e. ENABLE_EXTENSIONS is not defined |
7 | 7 |
8 #include "chrome/common/extensions/api/extension_api.h" | 8 #include "chrome/common/extensions/api/extension_api.h" |
9 | 9 |
| 10 #include "chrome/common/extensions/features/feature.h" |
| 11 |
10 namespace extensions { | 12 namespace extensions { |
11 | 13 |
12 // static | 14 // static |
13 ExtensionAPI* ExtensionAPI::GetSharedInstance() { | 15 ExtensionAPI* ExtensionAPI::GetSharedInstance() { |
14 return NULL; | 16 return NULL; |
15 } | 17 } |
16 | 18 |
17 // static | 19 // static |
18 ExtensionAPI* ExtensionAPI::CreateWithDefaultConfiguration() { | 20 ExtensionAPI* ExtensionAPI::CreateWithDefaultConfiguration() { |
19 return NULL; | 21 return NULL; |
20 } | 22 } |
21 | 23 |
| 24 Feature::Availability ExtensionAPI::IsAvailable( |
| 25 const std::string& api_full_name, |
| 26 const Extension* extension, |
| 27 Feature::Context context, |
| 28 const GURL& url) { |
| 29 return Feature::CreateAvailability(Feature::NOT_PRESENT, ""); |
| 30 } |
| 31 |
| 32 bool ExtensionAPI::IsAnyFeatureAvailableToContext(const std::string& api_name, |
| 33 Feature::Context context, |
| 34 const GURL& url) { |
| 35 return false; |
| 36 } |
| 37 |
| 38 std::set<std::string> ExtensionAPI::GetAllAPINames() { |
| 39 return std::set<std::string>(); |
| 40 } |
| 41 |
22 bool ExtensionAPI::IsPrivileged(const std::string& full_name) { | 42 bool ExtensionAPI::IsPrivileged(const std::string& full_name) { |
23 return false; | 43 return false; |
24 } | 44 } |
25 | 45 |
26 const base::DictionaryValue* ExtensionAPI::GetSchema( | 46 const base::DictionaryValue* ExtensionAPI::GetSchema( |
27 const std::string& full_name) { | 47 const std::string& full_name) { |
28 return NULL; | 48 return NULL; |
29 } | 49 } |
30 | 50 |
31 } // namespace extensions | 51 } // namespace extensions |
OLD | NEW |