| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "content/renderer/gpu/gpu_benchmarking_extension.h" | 5 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 " native function SendMessageToMicroBenchmark();" | 333 " native function SendMessageToMicroBenchmark();" |
| 334 " return SendMessageToMicroBenchmark(id, arguments);" | 334 " return SendMessageToMicroBenchmark(id, arguments);" |
| 335 "};" | 335 "};" |
| 336 "chrome.gpuBenchmarking.hasGpuProcess = function() {" | 336 "chrome.gpuBenchmarking.hasGpuProcess = function() {" |
| 337 " native function HasGpuProcess();" | 337 " native function HasGpuProcess();" |
| 338 " return HasGpuProcess();" | 338 " return HasGpuProcess();" |
| 339 "};") {} | 339 "};") {} |
| 340 | 340 |
| 341 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( | 341 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( |
| 342 v8::Isolate* isolate, | 342 v8::Isolate* isolate, |
| 343 v8::Handle<v8::String> name) OVERRIDE { | 343 v8::Handle<v8::String> name) override { |
| 344 if (name->Equals( | 344 if (name->Equals( |
| 345 v8::String::NewFromUtf8(isolate, "SetNeedsDisplayOnAllLayers"))) | 345 v8::String::NewFromUtf8(isolate, "SetNeedsDisplayOnAllLayers"))) |
| 346 return v8::FunctionTemplate::New(isolate, SetNeedsDisplayOnAllLayers); | 346 return v8::FunctionTemplate::New(isolate, SetNeedsDisplayOnAllLayers); |
| 347 if (name->Equals( | 347 if (name->Equals( |
| 348 v8::String::NewFromUtf8(isolate, "SetRasterizeOnlyVisibleContent"))) | 348 v8::String::NewFromUtf8(isolate, "SetRasterizeOnlyVisibleContent"))) |
| 349 return v8::FunctionTemplate::New(isolate, SetRasterizeOnlyVisibleContent); | 349 return v8::FunctionTemplate::New(isolate, SetRasterizeOnlyVisibleContent); |
| 350 if (name->Equals(v8::String::NewFromUtf8(isolate, "PrintToSkPicture"))) | 350 if (name->Equals(v8::String::NewFromUtf8(isolate, "PrintToSkPicture"))) |
| 351 return v8::FunctionTemplate::New(isolate, PrintToSkPicture); | 351 return v8::FunctionTemplate::New(isolate, PrintToSkPicture); |
| 352 if (name->Equals( | 352 if (name->Equals( |
| 353 v8::String::NewFromUtf8(isolate, "GestureSourceTypeSupported"))) | 353 v8::String::NewFromUtf8(isolate, "GestureSourceTypeSupported"))) |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); | 918 GpuChannelHost* gpu_channel = RenderThreadImpl::current()->GetGpuChannel(); |
| 919 args.GetReturnValue().Set(!!gpu_channel); | 919 args.GetReturnValue().Set(!!gpu_channel); |
| 920 } | 920 } |
| 921 }; | 921 }; |
| 922 | 922 |
| 923 v8::Extension* GpuBenchmarkingExtension::Get() { | 923 v8::Extension* GpuBenchmarkingExtension::Get() { |
| 924 return new GpuBenchmarkingWrapper(); | 924 return new GpuBenchmarkingWrapper(); |
| 925 } | 925 } |
| 926 | 926 |
| 927 } // namespace content | 927 } // namespace content |
| OLD | NEW |