| OLD | NEW |
| 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 "config.h" | |
| 6 #include "webkit/extensions/v8/interval_extension.h" | 5 #include "webkit/extensions/v8/interval_extension.h" |
| 7 #include "base/time.h" | 6 #include "base/time.h" |
| 8 | 7 |
| 9 namespace extensions_v8 { | 8 namespace extensions_v8 { |
| 10 | 9 |
| 11 const char* kIntervalExtensionName = "v8/Interval"; | 10 const char* kIntervalExtensionName = "v8/Interval"; |
| 12 | 11 |
| 13 class IntervalExtensionWrapper : public v8::Extension { | 12 class IntervalExtensionWrapper : public v8::Extension { |
| 14 public: | 13 public: |
| 15 IntervalExtensionWrapper() | 14 IntervalExtensionWrapper() |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 static v8::Handle<v8::Value> HiResTime(const v8::Arguments& args) { | 49 static v8::Handle<v8::Value> HiResTime(const v8::Arguments& args) { |
| 51 return v8::Number::New(base::Time::Now().ToDoubleT()); | 50 return v8::Number::New(base::Time::Now().ToDoubleT()); |
| 52 } | 51 } |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 v8::Extension* IntervalExtension::Get() { | 54 v8::Extension* IntervalExtension::Get() { |
| 56 return new IntervalExtensionWrapper(); | 55 return new IntervalExtensionWrapper(); |
| 57 } | 56 } |
| 58 | 57 |
| 59 } // namespace extensions_v8 | 58 } // namespace extensions_v8 |
| OLD | NEW |