Chromium Code Reviews| Index: chrome/renderer/extensions/binding_generating_native_handler.h |
| diff --git a/chrome/renderer/extensions/binding_generating_native_handler.h b/chrome/renderer/extensions/binding_generating_native_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..869f85b49f8c9c1e3cf903e2e3c70fc019bed0bf |
| --- /dev/null |
| +++ b/chrome/renderer/extensions/binding_generating_native_handler.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2012 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. |
| + |
| +#ifndef CHROME_RENDERER_EXTENSIONS_BINDING_GENERATING_NATIVE_HANDLER_H_ |
| +#define CHROME_RENDERER_EXTENSIONS_BINDING_GENERATING_NATIVE_HANDLER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/compiler_specific.h" |
| +#include "chrome/renderer/extensions/native_handler.h" |
| + |
| +namespace extensions { |
| + |
| +class ModuleSystem; |
| +class V8SchemaRegistry; |
| + |
| +// Generates API bindings based on the JSON/IDL schemas. This is done by passing |
| +// the schema into the |generate| function of schema_binding_generator.js. |
|
not at google - send to devlin
2013/02/13 01:45:49
note to self: is this |generate| function comment
cduvall
2013/02/15 00:40:28
Done.
|
| +class BindingGeneratingNativeHandler : public NativeHandler { |
| + public: |
| + BindingGeneratingNativeHandler(ModuleSystem* module_system, |
|
not at google - send to devlin
2013/02/13 01:45:49
Comment api_name and bind_to?
cduvall
2013/02/15 00:40:28
Done.
|
| + V8SchemaRegistry* schema_registry, |
| + const std::string& api_name, |
|
not at google - send to devlin
2013/02/13 01:45:49
+2 space
cduvall
2013/02/15 00:40:28
Done.
|
| + const std::string& bind_to); |
| + |
| + virtual v8::Handle<v8::Object> NewInstance() OVERRIDE; |
| + |
| + private: |
| + ModuleSystem* module_system_; |
| + V8SchemaRegistry* schema_registry_; |
| + std::string api_name_; |
| + std::string bind_to_; |
| +}; |
| + |
| +} // extensions |
| + |
| +#endif // CHROME_RENDERER_EXTENSIONS_BINDING_GENERATING_NATIVE_HANDLER_H_ |