blob: c5084bfa87f48d4ba2943ad830cc246e5669b15c [file] [log] [blame]
[email protected]701a94e2014-04-17 04:37:371// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef EXTENSIONS_RENDERER_API_DEFINITIONS_NATIVES_H_
6#define EXTENSIONS_RENDERER_API_DEFINITIONS_NATIVES_H_
7
avi2d124c02015-12-23 06:36:428#include "base/macros.h"
[email protected]701a94e2014-04-17 04:37:379#include "extensions/renderer/object_backed_native_handler.h"
10#include "v8/include/v8.h"
11
12namespace extensions {
13class Dispatcher;
14class ScriptContext;
15
16// Native functions for JS to get access to the schemas for extension APIs.
17class ApiDefinitionsNatives : public ObjectBackedNativeHandler {
18 public:
19 ApiDefinitionsNatives(Dispatcher* dispatcher, ScriptContext* context);
20
Devlin Cronind9ea8342018-01-27 06:00:0421 // ObjectBackedNativeHandler:
22 void AddRoutes() override;
23
[email protected]701a94e2014-04-17 04:37:3724 private:
25 // Returns the list of all schemas that are available to the calling context.
26 void GetExtensionAPIDefinitionsForTest(
27 const v8::FunctionCallbackInfo<v8::Value>& args);
28
29 // Not owned.
30 Dispatcher* dispatcher_;
31
32 DISALLOW_COPY_AND_ASSIGN(ApiDefinitionsNatives);
33};
34
35} // namespace extensions
36
37#endif // EXTENSIONS_RENDERER_API_DEFINITIONS_NATIVES_H_