cef/libcef/browser/extensions/extension_system_factory.cc
Marshall Greenblatt 8aac23386e Update to Chromium revision cb947c01 (#352221)
- Implement CefRequestHandler::OnBeforeBrowse using NavigationThrottle
  instead of ResourceThrottle (see http://crbug.com/537634). The CefRequest
  object passed to OnBeforeBrowse will no longer have an associated request
  identifier.
- Mac: Remove additional helper apps which are no longer required (see
  http://crbug.com/520680)
- Remove the UR_FLAG_REPORT_RAW_HEADERS flag which is no longer supported (see
  http://crbug.com/517114)
- Remove the CefBrowserSettings.java parameter. Java is an NPAPI plugin and
  NPAPI plugins are no longer supported (see http://crbug.com/470301#c11)
- Add CefFormatUrlForSecurityDisplay function in cef_parser.h
- Fix crash when passing `--disable-extensions` command-line flag (issue #1721)
- Linux: Fix NSS handler loading (issue #1727)
2015-10-09 17:31:27 -04:00

56 lines
1.8 KiB
C++

// Copyright 2014 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.
#include "libcef/browser/extensions/extension_system_factory.h"
#include "libcef/browser/extensions/extension_system.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "extensions/browser/extension_prefs_factory.h"
#include "extensions/browser/extension_registry_factory.h"
using content::BrowserContext;
namespace extensions {
ExtensionSystem* CefExtensionSystemFactory::GetForBrowserContext(
BrowserContext* context) {
return static_cast<CefExtensionSystem*>(
GetInstance()->GetServiceForBrowserContext(context, true));
}
// static
CefExtensionSystemFactory* CefExtensionSystemFactory::GetInstance() {
return base::Singleton<CefExtensionSystemFactory>::get();
}
CefExtensionSystemFactory::CefExtensionSystemFactory()
: ExtensionSystemProvider("CefExtensionSystem",
BrowserContextDependencyManager::GetInstance()) {
// Other factories that this factory depends on. See
// libcef/common/extensions/api/README.txt for additional details.
DependsOn(ExtensionPrefsFactory::GetInstance());
DependsOn(ExtensionRegistryFactory::GetInstance());
}
CefExtensionSystemFactory::~CefExtensionSystemFactory() {
}
KeyedService* CefExtensionSystemFactory::BuildServiceInstanceFor(
BrowserContext* context) const {
return new CefExtensionSystem(context);
}
BrowserContext* CefExtensionSystemFactory::GetBrowserContextToUse(
BrowserContext* context) const {
// Use a separate instance for incognito.
return context;
}
bool CefExtensionSystemFactory::ServiceIsCreatedWithBrowserContext() const {
return true;
}
} // namespace extensions