| 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 "content/child/shared_worker_devtools_agent.h" | 5 #include "content/child/shared_worker_devtools_agent.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "content/child/child_thread_impl.h" | 9 #include "content/child/child_thread_impl.h" |
| 10 #include "content/common/devtools_messages.h" | 10 #include "content/common/devtools_messages.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 webworker_->AttachDevTools(WebString::FromUTF8(host_id), session_id); | 84 webworker_->AttachDevTools(WebString::FromUTF8(host_id), session_id); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void SharedWorkerDevToolsAgent::OnReattach(const std::string& host_id, | 87 void SharedWorkerDevToolsAgent::OnReattach(const std::string& host_id, |
| 88 int session_id, | 88 int session_id, |
| 89 const std::string& state) { | 89 const std::string& state) { |
| 90 webworker_->ReattachDevTools(WebString::FromUTF8(host_id), session_id, | 90 webworker_->ReattachDevTools(WebString::FromUTF8(host_id), session_id, |
| 91 WebString::FromUTF8(state)); | 91 WebString::FromUTF8(state)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void SharedWorkerDevToolsAgent::OnDetach() { | 94 void SharedWorkerDevToolsAgent::OnDetach(int session_id) { |
| 95 webworker_->DetachDevTools(); | 95 webworker_->DetachDevTools(session_id); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void SharedWorkerDevToolsAgent::OnDispatchOnInspectorBackend( | 98 void SharedWorkerDevToolsAgent::OnDispatchOnInspectorBackend( |
| 99 int session_id, | 99 int session_id, |
| 100 int call_id, | 100 int call_id, |
| 101 const std::string& method, | 101 const std::string& method, |
| 102 const std::string& message) { | 102 const std::string& message) { |
| 103 webworker_->DispatchDevToolsMessage(session_id, call_id, | 103 webworker_->DispatchDevToolsMessage(session_id, call_id, |
| 104 WebString::FromUTF8(method), | 104 WebString::FromUTF8(method), |
| 105 WebString::FromUTF8(message)); | 105 WebString::FromUTF8(message)); |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { | 108 bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { |
| 109 return ChildThreadImpl::current()->Send(message); | 109 return ChildThreadImpl::current()->Send(message); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace content | 112 } // namespace content |
| OLD | NEW |