Home | History | Annotate | Download | only in extensions
      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 "chrome/common/extensions/chrome_extensions_client.h"
      6 
      7 #include "chrome/common/extensions/chrome_manifest_handlers.h"
      8 #include "chrome/common/extensions/features/base_feature_provider.h"
      9 
     10 namespace extensions {
     11 
     12 static base::LazyInstance<ChromeExtensionsClient> g_client =
     13     LAZY_INSTANCE_INITIALIZER;
     14 
     15 ChromeExtensionsClient::ChromeExtensionsClient()
     16     :  chrome_api_permissions_(ChromeAPIPermissions()) {
     17 }
     18 
     19 ChromeExtensionsClient::~ChromeExtensionsClient() {
     20 }
     21 
     22 const PermissionsProvider&
     23 ChromeExtensionsClient::GetPermissionsProvider() const {
     24   return chrome_api_permissions_;
     25 }
     26 
     27 FeatureProvider* ChromeExtensionsClient::GetFeatureProviderByName(
     28     const std::string& name) const {
     29   return BaseFeatureProvider::GetByName(name);
     30 }
     31 
     32 void ChromeExtensionsClient::RegisterManifestHandlers() const {
     33   RegisterChromeManifestHandlers();
     34 }
     35 
     36 // static
     37 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() {
     38   return g_client.Pointer();
     39 }
     40 
     41 }  // namespace extensions
     42