| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/worker_devtools_agent_proxy.h" | 5 #include "content/renderer/worker_devtools_agent_proxy.h" |
| 6 | 6 |
| 7 #include "content/common/devtools_messages.h" | 7 #include "content/common/devtools_messages.h" |
| 8 #include "content/renderer/webworker_base.h" | 8 #include "content/renderer/webworker_base.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void WorkerDevToolsAgentProxy::AttachDevTools() { | 46 void WorkerDevToolsAgentProxy::AttachDevTools() { |
| 47 Send(new WorkerDevToolsAgentMsg_Attach(route_id_)); | 47 Send(new WorkerDevToolsAgentMsg_Attach(route_id_)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void WorkerDevToolsAgentProxy::DetachDevTools() { | 50 void WorkerDevToolsAgentProxy::DetachDevTools() { |
| 51 Send(new WorkerDevToolsAgentMsg_Detach(route_id_)); | 51 Send(new WorkerDevToolsAgentMsg_Detach(route_id_)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void WorkerDevToolsAgentProxy::SendDevToolsMessage( | 54 void WorkerDevToolsAgentProxy::SendDevToolsMessage( |
| 55 const std::string& message) { | 55 const std::string& message) { |
| 56 Send(new WorkerDevToolsAgentMsg_DispatchOnInspectorBackend(route_id_, | 56 Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(route_id_, message)); |
| 57 message)); | |
| 58 } | 57 } |
| 59 | 58 |
| 60 void WorkerDevToolsAgentProxy::OnDispatchMessageFromWorker( | 59 void WorkerDevToolsAgentProxy::OnDispatchMessageFromWorker( |
| 61 const std::string& message) { | 60 const std::string& message) { |
| 62 webworker_client_->dispatchDevToolsMessage(WebString::fromUTF8(message)); | 61 webworker_client_->dispatchDevToolsMessage(WebString::fromUTF8(message)); |
| 63 } | 62 } |
| 64 | 63 |
| 65 void WorkerDevToolsAgentProxy::Send(IPC::Message* message) { | 64 void WorkerDevToolsAgentProxy::Send(IPC::Message* message) { |
| 66 webworker_->Send(message); | 65 webworker_->Send(message); |
| 67 } | 66 } |
| OLD | NEW |