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/binding_generating_native_handler.h" | 5 #include "chrome/renderer/extensions/binding_generating_native_handler.h" |
6 | 6 |
7 #include "chrome/renderer/extensions/module_system.h" | 7 #include "extensions/renderer/module_system.h" |
8 | 8 |
9 namespace extensions { | 9 namespace extensions { |
10 | 10 |
11 BindingGeneratingNativeHandler::BindingGeneratingNativeHandler( | 11 BindingGeneratingNativeHandler::BindingGeneratingNativeHandler( |
12 ModuleSystem* module_system, | 12 ModuleSystem* module_system, |
13 const std::string& api_name, | 13 const std::string& api_name, |
14 const std::string& bind_to) | 14 const std::string& bind_to) |
15 : module_system_(module_system), | 15 : module_system_(module_system), |
16 api_name_(api_name), | 16 api_name_(api_name), |
17 bind_to_(bind_to) { | 17 bind_to_(bind_to) { |
(...skipping 18 matching lines...) Expand all Loading... |
36 v8::Handle<v8::Value> compiled_schema = | 36 v8::Handle<v8::Value> compiled_schema = |
37 generate->Call(binding_instance, 0, NULL); | 37 generate->Call(binding_instance, 0, NULL); |
38 if (!compiled_schema.IsEmpty()) { | 38 if (!compiled_schema.IsEmpty()) { |
39 object->Set(v8::String::NewFromUtf8(isolate, bind_to_.c_str()), | 39 object->Set(v8::String::NewFromUtf8(isolate, bind_to_.c_str()), |
40 compiled_schema); | 40 compiled_schema); |
41 } | 41 } |
42 return scope.Escape(object); | 42 return scope.Escape(object); |
43 } | 43 } |
44 | 44 |
45 } // namespace extensions | 45 } // namespace extensions |
OLD | NEW |