| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/extensions/api_definitions_natives.h" | 5 #include "chrome/renderer/extensions/api_definitions_natives.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/common/extensions/features/feature.h" | 9 #include "extensions/common/features/feature.h" |
| 10 #include "extensions/common/features/feature_provider.h" | 10 #include "extensions/common/features/feature_provider.h" |
| 11 | 11 |
| 12 namespace extensions { | 12 namespace extensions { |
| 13 | 13 |
| 14 ApiDefinitionsNatives::ApiDefinitionsNatives(Dispatcher* dispatcher, | 14 ApiDefinitionsNatives::ApiDefinitionsNatives(Dispatcher* dispatcher, |
| 15 ChromeV8Context* context) | 15 ChromeV8Context* context) |
| 16 : ChromeV8Extension(dispatcher, context) { | 16 : ChromeV8Extension(dispatcher, context) { |
| 17 RouteFunction("GetExtensionAPIDefinitionsForTest", | 17 RouteFunction("GetExtensionAPIDefinitionsForTest", |
| 18 base::Bind( | 18 base::Bind( |
| 19 &ApiDefinitionsNatives::GetExtensionAPIDefinitionsForTest, | 19 &ApiDefinitionsNatives::GetExtensionAPIDefinitionsForTest, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 31 if (!feature_provider->GetParent(feature_provider->GetFeature(*i)) && | 31 if (!feature_provider->GetParent(feature_provider->GetFeature(*i)) && |
| 32 context()->GetAvailability(*i).is_available()) { | 32 context()->GetAvailability(*i).is_available()) { |
| 33 apis.push_back(*i); | 33 apis.push_back(*i); |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 args.GetReturnValue().Set( | 36 args.GetReturnValue().Set( |
| 37 dispatcher()->v8_schema_registry()->GetSchemas(apis)); | 37 dispatcher()->v8_schema_registry()->GetSchemas(apis)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace extensions | 40 } // namespace extensions |
| OLD | NEW |