| 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/worker/shared_worker_devtools_agent.h" | 5 #include "content/worker/shared_worker_devtools_agent.h" |
| 6 | 6 |
| 7 #include "content/common/devtools_messages.h" | 7 #include "content/common/devtools_messages.h" |
| 8 #include "content/worker/worker_thread.h" | 8 #include "content/worker/worker_thread.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/WebSharedWorker.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorker.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 OnPauseWorkerContextOnStart) | 36 OnPauseWorkerContextOnStart) |
| 37 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_ResumeWorkerContext, | 37 IPC_MESSAGE_HANDLER(DevToolsAgentMsg_ResumeWorkerContext, |
| 38 OnResumeWorkerContext) | 38 OnResumeWorkerContext) |
| 39 IPC_MESSAGE_UNHANDLED(handled = false) | 39 IPC_MESSAGE_UNHANDLED(handled = false) |
| 40 IPC_END_MESSAGE_MAP() | 40 IPC_END_MESSAGE_MAP() |
| 41 return handled; | 41 return handled; |
| 42 } | 42 } |
| 43 | 43 |
| 44 void SharedWorkerDevToolsAgent::SendDevToolsMessage( | 44 void SharedWorkerDevToolsAgent::SendDevToolsMessage( |
| 45 const WebKit::WebString& message) { | 45 const WebKit::WebString& message) { |
| 46 IPC::Message m = DevToolsClientMsg_DispatchOnInspectorFrontend( | 46 Send(new DevToolsClientMsg_DispatchOnInspectorFrontend( |
| 47 route_id_, | 47 route_id_, |
| 48 message.utf8()); | 48 message.utf8())); |
| 49 Send(new DevToolsHostMsg_ForwardToClient(route_id_, m)); | |
| 50 } | 49 } |
| 51 | 50 |
| 52 void SharedWorkerDevToolsAgent::SaveDevToolsAgentState( | 51 void SharedWorkerDevToolsAgent::SaveDevToolsAgentState( |
| 53 const WebKit::WebString& state) { | 52 const WebKit::WebString& state) { |
| 54 Send(new DevToolsHostMsg_SaveAgentRuntimeState(route_id_, | 53 Send(new DevToolsHostMsg_SaveAgentRuntimeState(route_id_, |
| 55 state.utf8())); | 54 state.utf8())); |
| 56 } | 55 } |
| 57 | 56 |
| 58 void SharedWorkerDevToolsAgent::OnAttach() { | 57 void SharedWorkerDevToolsAgent::OnAttach() { |
| 59 webworker_->attachDevTools(); | 58 webworker_->attachDevTools(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 76 webworker_->pauseWorkerContextOnStart(); | 75 webworker_->pauseWorkerContextOnStart(); |
| 77 } | 76 } |
| 78 | 77 |
| 79 void SharedWorkerDevToolsAgent::OnResumeWorkerContext() { | 78 void SharedWorkerDevToolsAgent::OnResumeWorkerContext() { |
| 80 webworker_->resumeWorkerContext(); | 79 webworker_->resumeWorkerContext(); |
| 81 } | 80 } |
| 82 | 81 |
| 83 bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { | 82 bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { |
| 84 return WorkerThread::current()->Send(message); | 83 return WorkerThread::current()->Send(message); |
| 85 } | 84 } |
| OLD | NEW |