Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: content/renderer/service_worker/embedded_worker_devtools_agent.cc

Issue 341513002: DevTools: pass agent host id to the renderer (content). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Same w/ reattach. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/service_worker/embedded_worker_devtools_agent.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/renderer/service_worker/embedded_worker_devtools_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698