| 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/renderer/service_worker/embedded_worker_devtools_agent.h" | 5 #include "content/renderer/service_worker/embedded_worker_devtools_agent.h" |
| 6 | 6 |
| 7 #include "content/child/child_thread.h" | 7 #include "content/child/child_thread.h" |
| 8 #include "content/common/devtools_messages.h" | 8 #include "content/common/devtools_messages.h" |
| 9 #include "content/renderer/render_thread_impl.h" | 9 #include "content/renderer/render_thread_impl.h" |
| 10 #include "third_party/WebKit/public/platform/WebCString.h" | 10 #include "third_party/WebKit/public/platform/WebCString.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_Detach, OnDetach) | 36 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_Detach, OnDetach) |
| 37 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend, | 37 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend, |
| 38 OnDispatchOnInspectorBackend) | 38 OnDispatchOnInspectorBackend) |
| 39 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_ResumeWorkerContext, | 39 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_ResumeWorkerContext, |
| 40 OnResumeWorkerContext) | 40 OnResumeWorkerContext) |
| 41 IPC_MESSAGE_UNHANDLED(handled = false) | 41 IPC_MESSAGE_UNHANDLED(handled = false) |
| 42 IPC_END_MESSAGE_MAP() | 42 IPC_END_MESSAGE_MAP() |
| 43 return handled; | 43 return handled; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void EmbeddedWorkerDevToolsAgent::OnAttach() { | 46 void EmbeddedWorkerDevToolsAgent::OnAttach(const std::string& host_id) { |
| 47 webworker_->attachDevTools(); | 47 webworker_->attachDevTools(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void EmbeddedWorkerDevToolsAgent::OnReattach(const std::string& state) { | 50 void EmbeddedWorkerDevToolsAgent::OnReattach(const std::string& host_id, |
| 51 const std::string& state) { |
| 51 webworker_->reattachDevTools(WebString::fromUTF8(state)); | 52 webworker_->reattachDevTools(WebString::fromUTF8(state)); |
| 52 } | 53 } |
| 53 | 54 |
| 54 void EmbeddedWorkerDevToolsAgent::OnDetach() { | 55 void EmbeddedWorkerDevToolsAgent::OnDetach() { |
| 55 webworker_->detachDevTools(); | 56 webworker_->detachDevTools(); |
| 56 } | 57 } |
| 57 | 58 |
| 58 void EmbeddedWorkerDevToolsAgent::OnDispatchOnInspectorBackend( | 59 void EmbeddedWorkerDevToolsAgent::OnDispatchOnInspectorBackend( |
| 59 const std::string& message) { | 60 const std::string& message) { |
| 60 webworker_->dispatchDevToolsMessage(WebString::fromUTF8(message)); | 61 webworker_->dispatchDevToolsMessage(WebString::fromUTF8(message)); |
| 61 } | 62 } |
| 62 | 63 |
| 63 void EmbeddedWorkerDevToolsAgent::OnResumeWorkerContext() { | 64 void EmbeddedWorkerDevToolsAgent::OnResumeWorkerContext() { |
| 64 webworker_->resumeWorkerContext(); | 65 webworker_->resumeWorkerContext(); |
| 65 } | 66 } |
| 66 | 67 |
| 67 } // namespace content | 68 } // namespace content |
| OLD | NEW |