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

Side by Side Diff: webkit/port/bindings/v8/extensions/Playback.cpp

Issue 18817: Add newlines to the end of files so that linux can compile (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/port/bindings/v8/extensions/Playback.h ('k') | no next file » | 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-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "Playback.h" 5 #include "Playback.h"
6 6
7 namespace WebCore { 7 namespace WebCore {
8 8
9 const char* kPlaybackExtensionName = "v8/PlaybackMode"; 9 const char* kPlaybackExtensionName = "v8/PlaybackMode";
10 10
11 v8::Extension* PlaybackExtension::Get() { 11 v8::Extension* PlaybackExtension::Get() {
12 v8::Extension* extension = new v8::Extension( 12 v8::Extension* extension = new v8::Extension(
13 kPlaybackExtensionName, 13 kPlaybackExtensionName,
14 "(function () {" 14 "(function () {"
15 " var orig_date = Date;" 15 " var orig_date = Date;"
16 " Math.random = function() {" 16 " Math.random = function() {"
17 " return 0.5;" 17 " return 0.5;"
18 " };" 18 " };"
19 " Date.__proto__.now = function() {" 19 " Date.__proto__.now = function() {"
20 " return new orig_date(1204251968254);" 20 " return new orig_date(1204251968254);"
21 " };" 21 " };"
22 " Date = function() {" 22 " Date = function() {"
23 " return Date.now();" 23 " return Date.now();"
24 " };" 24 " };"
25 "})()"); 25 "})()");
26 return extension; 26 return extension;
27 } 27 }
28 28
29 } 29 }
30
OLDNEW
« no previous file with comments | « webkit/port/bindings/v8/extensions/Playback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698