2015-08-14 16:41:08 +02:00
|
|
|
// Copyright 2015 The Chromium Embedded Framework Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "libcef/renderer/extensions/extensions_dispatcher_delegate.h"
|
|
|
|
|
2018-06-08 18:53:10 +02:00
|
|
|
#include "base/feature_list.h"
|
|
|
|
#include "chrome/grit/renderer_resources.h"
|
|
|
|
#include "extensions/common/extension_features.h"
|
|
|
|
#include "extensions/renderer/resource_bundle_source_map.h"
|
|
|
|
|
2015-08-14 16:41:08 +02:00
|
|
|
namespace extensions {
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefExtensionsDispatcherDelegate::CefExtensionsDispatcherDelegate() {}
|
2015-08-14 16:41:08 +02:00
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefExtensionsDispatcherDelegate::~CefExtensionsDispatcherDelegate() {}
|
2015-08-14 16:41:08 +02:00
|
|
|
|
2018-06-08 18:53:10 +02:00
|
|
|
void CefExtensionsDispatcherDelegate::PopulateSourceMap(
|
|
|
|
extensions::ResourceBundleSourceMap* source_map) {
|
|
|
|
// These bindings are unnecessary with native bindings enabled.
|
2018-10-02 14:14:11 +02:00
|
|
|
if (!base::FeatureList::IsEnabled(extensions_features::kNativeCrxBindings)) {
|
2018-06-08 18:53:10 +02:00
|
|
|
// Custom types sources.
|
|
|
|
source_map->RegisterSource("ContentSetting", IDR_CONTENT_SETTING_JS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-14 16:41:08 +02:00
|
|
|
} // namespace extensions
|