blob: dcc1b732febcfa1f6d4b9542acfdbc428ae3c56d [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
21 private:
22 // Returns the list of all schemas that are available to the calling context.
23 void GetExtensionAPIDefinitionsForTest(
24 const v8::FunctionCallbackInfo<v8::Value>& args);
25
26 // Not owned.
27 Dispatcher* dispatcher_;
28
29 DISALLOW_COPY_AND_ASSIGN(ApiDefinitionsNatives);
30};
31
32} // namespace extensions
33
34#endif // EXTENSIONS_RENDERER_API_DEFINITIONS_NATIVES_H_