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

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

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 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
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.h ('k') | content/renderer/java/gin_java_bridge_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698