2016-07-20 20:03:38 +02:00
|
|
|
// Copyright (c) 2016 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/common/extensions/chrome_generated_schemas.h"
|
|
|
|
|
|
|
|
#include "libcef/browser/extensions/chrome_api_registration.h"
|
|
|
|
|
|
|
|
#include "chrome/common/extensions/api/generated_schemas.h"
|
|
|
|
|
|
|
|
namespace extensions {
|
|
|
|
namespace api {
|
|
|
|
namespace cef {
|
|
|
|
|
|
|
|
// static
|
|
|
|
base::StringPiece ChromeGeneratedSchemas::Get(const std::string& name) {
|
2023-01-02 23:59:03 +01:00
|
|
|
if (!ChromeFunctionRegistry::IsSupported(name)) {
|
2016-07-20 20:03:38 +02:00
|
|
|
return base::StringPiece();
|
2023-01-02 23:59:03 +01:00
|
|
|
}
|
2016-07-20 20:03:38 +02:00
|
|
|
return extensions::api::ChromeGeneratedSchemas::Get(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
bool ChromeGeneratedSchemas::IsGenerated(std::string name) {
|
2023-01-02 23:59:03 +01:00
|
|
|
if (!ChromeFunctionRegistry::IsSupported(name)) {
|
2016-07-20 20:03:38 +02:00
|
|
|
return false;
|
2023-01-02 23:59:03 +01:00
|
|
|
}
|
2016-07-20 20:03:38 +02:00
|
|
|
return extensions::api::ChromeGeneratedSchemas::IsGenerated(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace cef
|
|
|
|
} // namespace api
|
|
|
|
} // namespace extensions
|