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

Side by Side Diff: webkit/extensions/v8/gears_extension.cc

Issue 231020: Preliminary fixes to enable link dependent objects.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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
« no previous file with comments | « third_party/tcmalloc/tcmalloc.gyp ('k') | webkit/tools/test_shell/test_shell.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 "config.h" 5 #include "config.h"
6 #include "webkit/extensions/v8/gears_extension.h" 6 #include "webkit/extensions/v8/gears_extension.h"
7 7
8 namespace extensions_v8 { 8 namespace extensions_v8 {
9 9
10 const char* kGearsExtensionName = "v8/Gears"; 10 const char* const kGearsExtensionName = "v8/Gears";
11 11
12 // Note: when a page touches the "google.gears.factory" object, this script 12 // Note: when a page touches the "google.gears.factory" object, this script
13 // touches the DOM. We expect the DOM to be available at that time. 13 // touches the DOM. We expect the DOM to be available at that time.
14 const char* kGearsExtensionScript = 14 const char* const kGearsExtensionScript =
15 "var google;" 15 "var google;"
16 "if (!google)" 16 "if (!google)"
17 " google = {};" 17 " google = {};"
18 "if (!google.gears)" 18 "if (!google.gears)"
19 " google.gears = {};" 19 " google.gears = {};"
20 "(function() {" 20 "(function() {"
21 " var factory = null;" 21 " var factory = null;"
22 " google.gears.__defineGetter__('factory', function() {" 22 " google.gears.__defineGetter__('factory', function() {"
23 " if (!factory) {" 23 " if (!factory) {"
24 " factory = document.createElement('object');" 24 " factory = document.createElement('object');"
(...skipping 11 matching lines...) Expand all
36 public: 36 public:
37 GearsExtensionWrapper() 37 GearsExtensionWrapper()
38 : v8::Extension(kGearsExtensionName, kGearsExtensionScript) {} 38 : v8::Extension(kGearsExtensionName, kGearsExtensionScript) {}
39 }; 39 };
40 40
41 v8::Extension* GearsExtension::Get() { 41 v8::Extension* GearsExtension::Get() {
42 return new GearsExtensionWrapper(); 42 return new GearsExtensionWrapper();
43 } 43 }
44 44
45 } // namespace extensions_v8 45 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « third_party/tcmalloc/tcmalloc.gyp ('k') | webkit/tools/test_shell/test_shell.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698