Guarantee CleanUpAfterPage gets run even if CloseConnection fails.
[chromium-blink-merge.git] / extensions / renderer / script_injection_callback.cc
blob45d3b0d82e2dff9528d73f747da4a7db35e9ba51
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
3 // found in the LICENSE file.
5 #include "extensions/renderer/script_injection_callback.h"
7 #include "extensions/renderer/script_injection.h"
9 namespace extensions {
11 ScriptInjectionCallback::ScriptInjectionCallback(
12 ScriptInjection* injection,
13 blink::WebLocalFrame* web_frame)
14 : injection_(injection),
15 web_frame_(web_frame) {
18 ScriptInjectionCallback::~ScriptInjectionCallback() {
21 void ScriptInjectionCallback::completed(
22 const blink::WebVector<v8::Local<v8::Value> >& result) {
23 injection_->OnJsInjectionCompleted(web_frame_, result);
24 delete this;
27 } // namespace extensions