Suppression for crbug/241044.
[chromium-blink-merge.git] / chrome / renderer / extensions / api_definitions_natives.cc
blob6004c7ae0c0de8c698454c75325f38170d5c2c15
1 // Copyright (c) 2012 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.
5 #include "chrome/renderer/extensions/api_definitions_natives.h"
7 #include <algorithm>
9 #include "chrome/common/extensions/api/extension_api.h"
11 namespace {
12 const char kInvalidExtensionNamespace[] = "Invalid extension namespace";
15 namespace extensions {
17 ApiDefinitionsNatives::ApiDefinitionsNatives(Dispatcher* dispatcher,
18 ChromeV8Context* context)
19 : ChromeV8Extension(dispatcher, context->v8_context()),
20 context_(context) {
21 RouteFunction("GetExtensionAPIDefinitions",
22 base::Bind(&ApiDefinitionsNatives::GetExtensionAPIDefinitions,
23 base::Unretained(this)));
26 v8::Handle<v8::Value> ApiDefinitionsNatives::GetExtensionAPIDefinitions(
27 const v8::Arguments& args) {
28 return dispatcher()->v8_schema_registry()->GetSchemas(
29 ExtensionAPI::GetSharedInstance()->GetAllAPINames());
32 } // namespace extensions