Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "chrome/renderer/extensions/schema_generated_native_handler.h" | |
| 6 | |
| 7 #include "chrome/renderer/extensions/v8_schema_registry.h" | |
| 8 | |
| 9 namespace extensions { | |
| 10 | |
| 11 SchemaGeneratedNativeHandler::SchemaGeneratedNativeHandler( | |
| 12 V8SchemaRegistry* schema_registry, | |
| 13 const std::string& api_name, | |
| 14 const std::string& bind_to) | |
| 15 : schema_registry_(schema_registry), | |
| 16 api_name_(api_name), | |
| 17 bind_to_(bind_to) { | |
| 18 } | |
| 19 | |
| 20 v8::Handle<v8::Object> SchemaGeneratedNativeHandler::NewInstance() { | |
| 21 v8::Handle<v8::Object> schema = schema_registry_->GetSchema(api_name_); | |
| 22 object_template_->Set(bind_to_.c_str(), schema); | |
|
not at google - send to devlin
2012/12/13 22:26:40
My thought was to have this call out to schema_bin
| |
| 23 return object_template_->NewInstance(); | |
| 24 } | |
| 25 | |
| 26 } // extensions | |
| OLD | NEW |