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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 << logging::SystemErrorCodeToString(hr); | 537 << logging::SystemErrorCodeToString(hr); |
538 } | 538 } |
539 return SkDocument::MakeXPS(s, factory.Get()); | 539 return SkDocument::MakeXPS(s, factory.Get()); |
540 } | 540 } |
541 #endif | 541 #endif |
542 } // namespace | 542 } // namespace |
543 | 543 |
544 gin::WrapperInfo GpuBenchmarking::kWrapperInfo = {gin::kEmbedderNativeGin}; | 544 gin::WrapperInfo GpuBenchmarking::kWrapperInfo = {gin::kEmbedderNativeGin}; |
545 | 545 |
546 // static | 546 // static |
547 void GpuBenchmarking::Install(blink::WebFrame* frame) { | 547 void GpuBenchmarking::Install(blink::WebLocalFrame* frame) { |
548 v8::Isolate* isolate = blink::MainThreadIsolate(); | 548 v8::Isolate* isolate = blink::MainThreadIsolate(); |
549 v8::HandleScope handle_scope(isolate); | 549 v8::HandleScope handle_scope(isolate); |
550 v8::Local<v8::Context> context = frame->MainWorldScriptContext(); | 550 v8::Local<v8::Context> context = frame->MainWorldScriptContext(); |
551 if (context.IsEmpty()) | 551 if (context.IsEmpty()) |
552 return; | 552 return; |
553 | 553 |
554 v8::Context::Scope context_scope(context); | 554 v8::Context::Scope context_scope(context); |
555 | 555 |
556 gin::Handle<GpuBenchmarking> controller = | 556 gin::Handle<GpuBenchmarking> controller = |
557 gin::CreateHandle(isolate, new GpuBenchmarking()); | 557 gin::CreateHandle(isolate, new GpuBenchmarking()); |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 &gpu_driver_bug_workarounds))) { | 1133 &gpu_driver_bug_workarounds))) { |
1134 return; | 1134 return; |
1135 } | 1135 } |
1136 | 1136 |
1137 v8::Local<v8::Value> result; | 1137 v8::Local<v8::Value> result; |
1138 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) | 1138 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) |
1139 args->Return(result); | 1139 args->Return(result); |
1140 } | 1140 } |
1141 | 1141 |
1142 } // namespace content | 1142 } // namespace content |
OLD | NEW |