Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

Side by Side Diff: chrome/renderer/extensions/schema_generated_native_handler.cc

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698