OLD | NEW |
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 |
OLD | NEW |