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

Side by Side Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 10532058: added gpu_benchmarking_extension boilerplate and hooked it up to a new switch. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed merge conflict Created 8 years, 6 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
OLDNEW
(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
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698