2015-07-16 23:40:01 +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.
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/libcef/common/extensions/extensions_util.h"
|
2015-07-16 23:40:01 +02:00
|
|
|
|
|
|
|
#include "base/command_line.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/libcef/common/cef_switches.h"
|
|
|
|
#include "cef/libcef/features/runtime.h"
|
2015-07-16 23:40:01 +02:00
|
|
|
#include "chrome/common/chrome_switches.h"
|
|
|
|
|
|
|
|
namespace extensions {
|
|
|
|
|
|
|
|
bool ExtensionsEnabled() {
|
2024-04-17 18:01:26 +02:00
|
|
|
static bool enabled = cef::IsAlloyRuntimeEnabled() &&
|
|
|
|
!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
|
|
|
switches::kDisableExtensions);
|
2015-07-16 23:40:01 +02:00
|
|
|
return enabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool PdfExtensionEnabled() {
|
|
|
|
static bool enabled =
|
2017-05-17 11:29:28 +02:00
|
|
|
ExtensionsEnabled() && !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
|
|
|
switches::kDisablePdfExtension);
|
2015-07-16 23:40:01 +02:00
|
|
|
return enabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace extensions
|