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

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

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: windows fixes Created 9 years, 9 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 | « webkit/extensions/v8/gears_extension.h ('k') | webkit/glue/webdropdata.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "webkit/extensions/v8/gears_extension.h"
6
7 namespace extensions_v8 {
8
9 const char* const kGearsExtensionName = "v8/Gears";
10
11 // Note: when a page touches the "google.gears.factory" object, this script
12 // touches the DOM. We expect the DOM to be available at that time.
13 const char* const kGearsExtensionScript =
14 "var google;"
15 "if (!google)"
16 " google = {};"
17 "if (!google.gears)"
18 " google.gears = {};"
19 "(function() {"
20 " var factory = null;"
21 " google.gears.__defineGetter__('factory', function() {"
22 " if (!factory) {"
23 " factory = document.createElement('object');"
24 " factory.width = 0;"
25 " factory.height = 0;"
26 " factory.style.visibility = 'hidden';"
27 " factory.type = 'application/x-googlegears';"
28 " document.documentElement.appendChild(factory);"
29 " }"
30 " return factory;"
31 " });"
32 "})();";
33
34 class GearsExtensionWrapper : public v8::Extension {
35 public:
36 GearsExtensionWrapper()
37 : v8::Extension(kGearsExtensionName, kGearsExtensionScript) {}
38 };
39
40 v8::Extension* GearsExtension::Get() {
41 return new GearsExtensionWrapper();
42 }
43
44 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « webkit/extensions/v8/gears_extension.h ('k') | webkit/glue/webdropdata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698