Chromium Code Reviews| Index: chrome/browser/extensions/api/webview/webview_api.cc |
| diff --git a/chrome/browser/extensions/api/webview/webview_api.cc b/chrome/browser/extensions/api/webview/webview_api.cc |
| index 7879c3be8040a3997c9c7c2f4a52485e388e5f7f..05b3ecee80fd3f7cac926fff97e3df22f54b7885 100644 |
| --- a/chrome/browser/extensions/api/webview/webview_api.cc |
| +++ b/chrome/browser/extensions/api/webview/webview_api.cc |
| @@ -263,8 +263,15 @@ bool WebviewExecuteCodeFunction::Init() { |
| if (!guest_instance_id_) |
| return false; |
| + if (!args_->GetString(1, &guest_src_)) |
| + return false; |
| + |
| + if (guest_src_.empty()) { |
| + return false; |
| + } |
| + |
| base::DictionaryValue* details_value = NULL; |
| - if (!args_->GetDictionary(1, &details_value)) |
| + if (!args_->GetDictionary(2, &details_value)) |
| return false; |
| scoped_ptr<InjectDetails> details(new InjectDetails()); |
| if (!InjectDetails::Populate(*details_value, details.get())) |
| @@ -294,6 +301,9 @@ extensions::ScriptExecutor* WebviewExecuteCodeFunction::GetScriptExecutor() { |
| bool WebviewExecuteCodeFunction::IsWebView() const { |
| return true; |
| } |
| +std::string WebviewExecuteCodeFunction::GetWebViewSrc() const { |
|
Fady Samuel
2014/04/04 19:35:05
Move down one line.
Xi Han
2014/04/06 20:14:03
Done.
|
| + return guest_src_; |
| +} |
| WebviewExecuteScriptFunction::WebviewExecuteScriptFunction() { |
| } |