OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/extensions/api/webview/webview_api.h" | 5 #include "chrome/browser/extensions/api/webview/webview_api.h" |
6 | 6 |
7 #include "chrome/common/extensions/api/webview.h" | 7 #include "chrome/common/extensions/api/webview.h" |
8 #include "content/public/browser/render_view_host.h" | 8 #include "content/public/browser/render_view_host.h" |
9 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
10 | 10 |
| 11 using extensions::api::tabs::InjectDetails; |
11 using namespace extensions::api::webview; | 12 using namespace extensions::api::webview; |
12 | 13 |
13 WebviewExecuteScriptFunction::WebviewExecuteScriptFunction() { | 14 WebviewExecuteScriptFunction::WebviewExecuteScriptFunction() { |
14 } | 15 } |
15 | 16 |
16 WebviewExecuteScriptFunction::~WebviewExecuteScriptFunction() { | 17 WebviewExecuteScriptFunction::~WebviewExecuteScriptFunction() { |
17 } | 18 } |
18 | 19 |
19 bool WebviewExecuteScriptFunction::RunImpl() { | 20 bool WebviewExecuteScriptFunction::RunImpl() { |
20 scoped_ptr<ExecuteScript::Params> params( | 21 scoped_ptr<ExecuteScript::Params> params( |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const ListValue& result) { | 81 const ListValue& result) { |
81 if (error.empty()) { | 82 if (error.empty()) { |
82 SetResult(result.DeepCopy()); | 83 SetResult(result.DeepCopy()); |
83 } else { | 84 } else { |
84 SetError(error); | 85 SetError(error); |
85 } | 86 } |
86 SendResponse(error.empty()); | 87 SendResponse(error.empty()); |
87 Release(); // Added in RunImpl(). | 88 Release(); // Added in RunImpl(). |
88 } | 89 } |
89 | 90 |
OLD | NEW |