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