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.
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/libcef/common/extensions/chrome_generated_schemas.h"
|
2016-07-20 20:03:38 +02:00
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/libcef/browser/extensions/chrome_api_registration.h"
|
2016-07-20 20:03:38 +02:00
|
|
|
#include "chrome/common/extensions/api/generated_schemas.h"
|
|
|
|
|
2024-01-20 23:48:57 +01:00
|
|
|
namespace extensions::api::cef {
|
2016-07-20 20:03:38 +02:00
|
|
|
|
|
|
|
// static
|
2024-04-23 22:06:00 +02:00
|
|
|
std::string_view ChromeGeneratedSchemas::Get(const std::string& name) {
|
2023-01-02 23:59:03 +01:00
|
|
|
if (!ChromeFunctionRegistry::IsSupported(name)) {
|
2024-04-23 22:06:00 +02:00
|
|
|
return std::string_view();
|
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);
|
|
|
|
}
|
|
|
|
|
2024-01-20 23:48:57 +01:00
|
|
|
} // namespace extensions::api::cef
|