OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/html_viewer/test_html_viewer_impl.h" | 5 #include "components/html_viewer/test_html_viewer_impl.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/macros.h" |
8 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
9 #include "base/values.h" | 10 #include "base/values.h" |
10 #include "gin/converter.h" | 11 #include "gin/converter.h" |
11 #include "third_party/WebKit/public/platform/WebString.h" | 12 #include "third_party/WebKit/public/platform/WebString.h" |
12 #include "third_party/WebKit/public/web/WebDocument.h" | 13 #include "third_party/WebKit/public/web/WebDocument.h" |
13 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 14 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
14 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 15 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
15 #include "third_party/WebKit/public/web/WebScriptSource.h" | 16 #include "third_party/WebKit/public/web/WebScriptSource.h" |
16 | 17 |
17 using blink::WebDocument; | 18 using blink::WebDocument; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const ExecuteScriptCallback& callback) { | 86 const ExecuteScriptCallback& callback) { |
86 ExecutionCallbackImpl* callback_impl = | 87 ExecutionCallbackImpl* callback_impl = |
87 new ExecutionCallbackImpl(this, callback); | 88 new ExecutionCallbackImpl(this, callback); |
88 callbacks_.insert(callback_impl); | 89 callbacks_.insert(callback_impl); |
89 web_frame_->requestExecuteScriptAndReturnValue( | 90 web_frame_->requestExecuteScriptAndReturnValue( |
90 blink::WebScriptSource(blink::WebString::fromUTF8(script)), false, | 91 blink::WebScriptSource(blink::WebString::fromUTF8(script)), false, |
91 callback_impl); | 92 callback_impl); |
92 } | 93 } |
93 | 94 |
94 } // namespace html_viewer | 95 } // namespace html_viewer |
OLD | NEW |