| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/js_only_v8_extensions.h" | 5 #include "chrome/renderer/js_only_v8_extensions.h" |
| 6 | 6 |
| 7 #include "chrome/renderer/extensions/bindings_utils.h" | 7 #include "chrome/renderer/extensions/bindings_utils.h" |
| 8 #include "grit/renderer_resources.h" | 8 #include "grit/renderer_resources.h" |
| 9 #include "grit/webkit_resources.h" | 9 #include "grit/webkit_resources.h" |
| 10 | 10 |
| 11 // BaseJsV8Extension | 11 // BaseJsV8Extension |
| 12 const char* BaseJsV8Extension::kName = "chrome/base"; | 12 const char* BaseJsV8Extension::kName = "chrome/base"; |
| 13 v8::Extension* BaseJsV8Extension::Get() { | 13 v8::Extension* BaseJsV8Extension::Get() { |
| 14 return new v8::Extension(kName, GetStringResource<IDR_DEVTOOLS_BASE_JS>(), | 14 return new v8::Extension(kName, GetStringResource<IDR_DEVTOOLS_BASE_JS>(), |
| 15 0, NULL); | 15 0, NULL); |
| 16 } | 16 } |
| 17 | 17 |
| 18 // JsonJsV8Extension | |
| 19 const char* JsonJsV8Extension::kName = "chrome/json"; | |
| 20 v8::Extension* JsonJsV8Extension::Get() { | |
| 21 static const char* deps[] = { | |
| 22 BaseJsV8Extension::kName | |
| 23 }; | |
| 24 return new v8::Extension(kName, GetStringResource<IDR_DEVTOOLS_JSON_JS>(), | |
| 25 arraysize(deps), deps); | |
| 26 } | |
| 27 | |
| 28 // JsonSchemaJsV8Extension | 18 // JsonSchemaJsV8Extension |
| 29 const char* JsonSchemaJsV8Extension::kName = "chrome/jsonschema"; | 19 const char* JsonSchemaJsV8Extension::kName = "chrome/jsonschema"; |
| 30 v8::Extension* JsonSchemaJsV8Extension::Get() { | 20 v8::Extension* JsonSchemaJsV8Extension::Get() { |
| 31 return new v8::Extension(kName, GetStringResource<IDR_JSON_SCHEMA_JS>(), | 21 return new v8::Extension(kName, GetStringResource<IDR_JSON_SCHEMA_JS>(), |
| 32 0, NULL); | 22 0, NULL); |
| 33 } | 23 } |
| OLD | NEW |