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 "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 "third_party/WebKit/public/platform/WebCString.h" | 9 #include "third_party/WebKit/public/platform/WebCString.h" |
10 #include "third_party/WebKit/public/platform/WebString.h" | 10 #include "third_party/WebKit/public/platform/WebString.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 route_id_, | 47 route_id_, |
48 message.utf8())); | 48 message.utf8())); |
49 } | 49 } |
50 | 50 |
51 void SharedWorkerDevToolsAgent::SaveDevToolsAgentState( | 51 void SharedWorkerDevToolsAgent::SaveDevToolsAgentState( |
52 const blink::WebString& state) { | 52 const blink::WebString& state) { |
53 Send(new DevToolsHostMsg_SaveAgentRuntimeState(route_id_, | 53 Send(new DevToolsHostMsg_SaveAgentRuntimeState(route_id_, |
54 state.utf8())); | 54 state.utf8())); |
55 } | 55 } |
56 | 56 |
57 void SharedWorkerDevToolsAgent::OnAttach() { | 57 void SharedWorkerDevToolsAgent::OnAttach(const std::string& host_id) { |
58 webworker_->attachDevTools(); | 58 webworker_->attachDevTools(); |
59 } | 59 } |
60 | 60 |
61 void SharedWorkerDevToolsAgent::OnReattach(const std::string& state) { | 61 void SharedWorkerDevToolsAgent::OnReattach(const std::string& host_id, |
| 62 const std::string& state) { |
62 webworker_->reattachDevTools(WebString::fromUTF8(state)); | 63 webworker_->reattachDevTools(WebString::fromUTF8(state)); |
63 } | 64 } |
64 | 65 |
65 void SharedWorkerDevToolsAgent::OnDetach() { | 66 void SharedWorkerDevToolsAgent::OnDetach() { |
66 webworker_->detachDevTools(); | 67 webworker_->detachDevTools(); |
67 } | 68 } |
68 | 69 |
69 void SharedWorkerDevToolsAgent::OnDispatchOnInspectorBackend( | 70 void SharedWorkerDevToolsAgent::OnDispatchOnInspectorBackend( |
70 const std::string& message) { | 71 const std::string& message) { |
71 webworker_->dispatchDevToolsMessage(WebString::fromUTF8(message)); | 72 webworker_->dispatchDevToolsMessage(WebString::fromUTF8(message)); |
72 } | 73 } |
73 | 74 |
74 void SharedWorkerDevToolsAgent::OnResumeWorkerContext() { | 75 void SharedWorkerDevToolsAgent::OnResumeWorkerContext() { |
75 webworker_->resumeWorkerContext(); | 76 webworker_->resumeWorkerContext(); |
76 } | 77 } |
77 | 78 |
78 bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { | 79 bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { |
79 return ChildThread::current()->Send(message); | 80 return ChildThread::current()->Send(message); |
80 } | 81 } |
81 | 82 |
82 } // namespace content | 83 } // namespace content |
OLD | NEW |