diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 05:56:28 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-25 05:56:28 +0000 |
commit | d7087bbb78b063ef5302e510dd3ca6375905b9cf (patch) | |
tree | af8731b0d37013a8a0fc43c490cd08707b41d3e5 /chrome/renderer/extensions/js_only_v8_extensions.cc | |
parent | cdc263cb4c0e4627d49a7e59c36d583b73381fa9 (diff) | |
download | chromium_src-d7087bbb78b063ef5302e510dd3ca6375905b9cf.zip chromium_src-d7087bbb78b063ef5302e510dd3ca6375905b9cf.tar.gz chromium_src-d7087bbb78b063ef5302e510dd3ca6375905b9cf.tar.bz2 |
Change the way json_schema.js is loaded. This is required so
that ChromeOS can use extension-style bindings without polluting the global scope of webpages.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24174
Review URL: http://codereview.chromium.org/173263
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/js_only_v8_extensions.cc')
-rw-r--r-- | chrome/renderer/extensions/js_only_v8_extensions.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/chrome/renderer/extensions/js_only_v8_extensions.cc b/chrome/renderer/extensions/js_only_v8_extensions.cc new file mode 100644 index 0000000..986e656 --- /dev/null +++ b/chrome/renderer/extensions/js_only_v8_extensions.cc @@ -0,0 +1,29 @@ +// Copyright (c) 2009 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. + +#include "chrome/renderer/extensions/js_only_v8_extensions.h" + +#include "chrome/renderer/extensions/bindings_utils.h" +#include "grit/renderer_resources.h" +#include "grit/webkit_resources.h" + +using bindings_utils::GetStringResource; + +// BaseJsV8Extension +const char* BaseJsV8Extension::kName = "chrome/base"; +v8::Extension* BaseJsV8Extension::Get() { + static v8::Extension* extension = + new bindings_utils::ExtensionBase( + kName, GetStringResource<IDR_DEVTOOLS_BASE_JS>(), 0, NULL); + return extension; +} + +// JsonSchemaJsV8Extension +const char* JsonSchemaJsV8Extension::kName = "chrome/jsonschema"; +v8::Extension* JsonSchemaJsV8Extension::Get() { + static v8::Extension* extension = + new bindings_utils::ExtensionBase( + kName, GetStringResource<IDR_JSON_SCHEMA_JS>(), 0, NULL); + return extension; +} |