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

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

Issue 5581008: Add a new GetInstance() method for singleton classes, take 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 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
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/extensions/js_only_v8_extensions.h" 5 #include "chrome/renderer/extensions/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 9
10 using bindings_utils::GetStringResource; 10 using bindings_utils::GetStringResource;
11 11
12 // BaseJsV8Extension 12 // BaseJsV8Extension
13 const char* BaseJsV8Extension::kName = "chrome/base"; 13 const char* BaseJsV8Extension::kName = "chrome/base";
14 v8::Extension* BaseJsV8Extension::Get() { 14 v8::Extension* BaseJsV8Extension::Get() {
15 static v8::Extension* extension = 15 static v8::Extension* extension =
16 new bindings_utils::ExtensionBase( 16 new bindings_utils::ExtensionBase(
17 kName, GetStringResource<IDR_BASE_JS>(), 0, NULL); 17 kName, GetStringResource(IDR_BASE_JS), 0, NULL);
18 return extension; 18 return extension;
19 } 19 }
20 20
21 // JsonSchemaJsV8Extension 21 // JsonSchemaJsV8Extension
22 const char* JsonSchemaJsV8Extension::kName = "chrome/jsonschema"; 22 const char* JsonSchemaJsV8Extension::kName = "chrome/jsonschema";
23 v8::Extension* JsonSchemaJsV8Extension::Get() { 23 v8::Extension* JsonSchemaJsV8Extension::Get() {
24 static v8::Extension* extension = 24 static v8::Extension* extension =
25 new bindings_utils::ExtensionBase( 25 new bindings_utils::ExtensionBase(
26 kName, GetStringResource<IDR_JSON_SCHEMA_JS>(), 0, NULL); 26 kName, GetStringResource(IDR_JSON_SCHEMA_JS), 0, NULL);
27 return extension; 27 return extension;
28 } 28 }
29 29
30 // ExtensionApiTestV8Extension 30 // ExtensionApiTestV8Extension
31 const char* ExtensionApiTestV8Extension::kName = "chrome/extensionapitest"; 31 const char* ExtensionApiTestV8Extension::kName = "chrome/extensionapitest";
32 v8::Extension* ExtensionApiTestV8Extension::Get() { 32 v8::Extension* ExtensionApiTestV8Extension::Get() {
33 static v8::Extension* extension = 33 static v8::Extension* extension =
34 new bindings_utils::ExtensionBase( 34 new bindings_utils::ExtensionBase(
35 kName, GetStringResource<IDR_EXTENSION_APITEST_JS>(), 0, NULL); 35 kName, GetStringResource(IDR_EXTENSION_APITEST_JS), 0, NULL);
36 return extension; 36 return extension;
37 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698