OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 6 |
| 7 #include "v8/include/v8.h" |
| 8 |
| 9 const char kGpuBenchmarkingExtensionName[] = "v8/GpuBenchmarking"; |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class GpuBenchmarkingWrapper : public v8::Extension { |
| 14 public: |
| 15 GpuBenchmarkingWrapper() : |
| 16 v8::Extension(kGpuBenchmarkingExtensionName, |
| 17 "if (typeof(chrome) == 'undefined') {" |
| 18 " chrome = {};" |
| 19 "};" |
| 20 "if (typeof(chrome.gpuBenchmarking) == 'undefined') {" |
| 21 " chrome.gpuBenchmarking = {};" |
| 22 "};") {} |
| 23 |
| 24 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
| 25 v8::Handle<v8::String> name) { |
| 26 return v8::Handle<v8::FunctionTemplate>(); |
| 27 } |
| 28 }; |
| 29 |
| 30 v8::Extension* GpuBenchmarkingExtension::Get() { |
| 31 return new GpuBenchmarkingWrapper(); |
| 32 } |
| 33 |
| 34 } // namespace content |
OLD | NEW |