| 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/browser/devtools/worker_devtools_agent_host.h" | 5 #include "content/browser/devtools/worker_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include "content/browser/devtools/ipc_devtools_agent_host.h" | 7 #include "content/browser/devtools/ipc_devtools_agent_host.h" |
| 8 #include "content/browser/devtools/protocol/devtools_protocol_handler.h" | 8 #include "content/browser/devtools/protocol/devtools_protocol_handler.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 state_ = WORKER_UNINSPECTED; | 48 state_ = WORKER_UNINSPECTED; |
| 49 DetachFromWorker(); | 49 DetachFromWorker(); |
| 50 } else if (state_ == WORKER_PAUSED_FOR_REATTACH) { | 50 } else if (state_ == WORKER_PAUSED_FOR_REATTACH) { |
| 51 state_ = WORKER_UNINSPECTED; | 51 state_ = WORKER_UNINSPECTED; |
| 52 } | 52 } |
| 53 DevToolsAgentHostImpl::NotifyCallbacks(this, false); | 53 DevToolsAgentHostImpl::NotifyCallbacks(this, false); |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool WorkerDevToolsAgentHost::OnMessageReceived( | 56 bool WorkerDevToolsAgentHost::OnMessageReceived( |
| 57 const IPC::Message& msg) { | 57 const IPC::Message& msg) { |
| 58 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 58 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 59 bool handled = true; | 59 bool handled = true; |
| 60 IPC_BEGIN_MESSAGE_MAP(WorkerDevToolsAgentHost, msg) | 60 IPC_BEGIN_MESSAGE_MAP(WorkerDevToolsAgentHost, msg) |
| 61 IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend, | 61 IPC_MESSAGE_HANDLER(DevToolsClientMsg_DispatchOnInspectorFrontend, |
| 62 OnDispatchOnInspectorFrontend) | 62 OnDispatchOnInspectorFrontend) |
| 63 IPC_MESSAGE_UNHANDLED(handled = false) | 63 IPC_MESSAGE_UNHANDLED(handled = false) |
| 64 IPC_END_MESSAGE_MAP() | 64 IPC_END_MESSAGE_MAP() |
| 65 return handled; | 65 return handled; |
| 66 } | 66 } |
| 67 | 67 |
| 68 void WorkerDevToolsAgentHost::PauseForDebugOnStart() { | 68 void WorkerDevToolsAgentHost::PauseForDebugOnStart() { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 void WorkerDevToolsAgentHost::OnDispatchOnInspectorFrontend( | 139 void WorkerDevToolsAgentHost::OnDispatchOnInspectorFrontend( |
| 140 const DevToolsMessageChunk& message) { | 140 const DevToolsMessageChunk& message) { |
| 141 if (!IsAttached()) | 141 if (!IsAttached()) |
| 142 return; | 142 return; |
| 143 | 143 |
| 144 ProcessChunkedMessageFromAgent(message); | 144 ProcessChunkedMessageFromAgent(message); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace content | 147 } // namespace content |
| OLD | NEW |