OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 #if !defined(_WIN32) && !defined(_WIN64) | 5 #if !defined(_WIN32) && !defined(_WIN64) |
6 #include <unistd.h> // NOLINT | 6 #include <unistd.h> // NOLINT |
7 #endif // !defined(_WIN32) && !defined(_WIN64) | 7 #endif // !defined(_WIN32) && !defined(_WIN64) |
8 | 8 |
9 #include "include/libplatform/libplatform.h" | 9 #include "include/libplatform/libplatform.h" |
10 #include "include/v8.h" | 10 #include "include/v8.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 | 151 |
152 class FrontendChannelImpl : public InspectorClientImpl::FrontendChannel { | 152 class FrontendChannelImpl : public InspectorClientImpl::FrontendChannel { |
153 public: | 153 public: |
154 explicit FrontendChannelImpl(TaskRunner* frontend_task_runner) | 154 explicit FrontendChannelImpl(TaskRunner* frontend_task_runner) |
155 : frontend_task_runner_(frontend_task_runner) {} | 155 : frontend_task_runner_(frontend_task_runner) {} |
156 virtual ~FrontendChannelImpl() {} | 156 virtual ~FrontendChannelImpl() {} |
157 | 157 |
158 void SendMessageToFrontend(const v8_inspector::StringView& message) final { | 158 void SendMessageToFrontend(const v8_inspector::StringView& message) final { |
159 v8_inspector::String16Builder script; | 159 v8_inspector::String16Builder script; |
160 script.append("InspectorTest.dispatchMessage("); | 160 script.append("InspectorTest._dispatchMessage("); |
161 script.append(ToString16(message)); | 161 script.append(ToString16(message)); |
162 script.append(")"); | 162 script.append(")"); |
163 frontend_task_runner_->Append(new ExecuteStringTask(script.toString())); | 163 frontend_task_runner_->Append(new ExecuteStringTask(script.toString())); |
164 } | 164 } |
165 | 165 |
166 private: | 166 private: |
167 TaskRunner* frontend_task_runner_; | 167 TaskRunner* frontend_task_runner_; |
168 }; | 168 }; |
169 | 169 |
170 } // namespace | 170 } // namespace |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 Exit(); | 217 Exit(); |
218 } | 218 } |
219 v8_inspector::String16 source = | 219 v8_inspector::String16 source = |
220 v8_inspector::String16::fromUTF8(chars.start(), chars.length()); | 220 v8_inspector::String16::fromUTF8(chars.start(), chars.length()); |
221 frontend_runner.Append(new ExecuteStringTask(source)); | 221 frontend_runner.Append(new ExecuteStringTask(source)); |
222 } | 222 } |
223 | 223 |
224 frontend_runner.Join(); | 224 frontend_runner.Join(); |
225 return 0; | 225 return 0; |
226 } | 226 } |
OLD | NEW |