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

Side by Side Diff: extensions/renderer/script_injection_callback.cc

Issue 2556153002: [Extensions] Convert more callers of CallModuleMethod (Closed)
Patch Set: revert doc change Created 4 years 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
« no previous file with comments | « extensions/renderer/script_injection_callback.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "extensions/renderer/script_injection_callback.h" 5 #include "extensions/renderer/script_injection_callback.h"
6 6
7 #include "third_party/WebKit/public/platform/WebVector.h"
8
7 namespace extensions { 9 namespace extensions {
8 10
9 ScriptInjectionCallback::ScriptInjectionCallback( 11 ScriptInjectionCallback::ScriptInjectionCallback(
10 const CompleteCallback& injection_completed_callback) 12 const CompleteCallback& injection_completed_callback)
11 : injection_completed_callback_(injection_completed_callback) { 13 : injection_completed_callback_(injection_completed_callback) {
12 } 14 }
13 15
14 ScriptInjectionCallback::~ScriptInjectionCallback() { 16 ScriptInjectionCallback::~ScriptInjectionCallback() {
15 } 17 }
16 18
17 void ScriptInjectionCallback::completed( 19 void ScriptInjectionCallback::completed(
18 const blink::WebVector<v8::Local<v8::Value> >& result) { 20 const blink::WebVector<v8::Local<v8::Value> >& result) {
19 injection_completed_callback_.Run(result); 21 std::vector<v8::Local<v8::Value>> stl_result(result.begin(), result.end());
22 injection_completed_callback_.Run(stl_result);
20 delete this; 23 delete this;
21 } 24 }
22 25
23 } // namespace extensions 26 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/script_injection_callback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698