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

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

Issue 251723002: Introduce EmbeddedWorkerDevToolsAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: EmbeddedWorkerDevToolsAgent Created 6 years, 7 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
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 #ifndef CONTENT_CHILD_SHARED_WORKER_DEVTOOLS_AGENT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DEVTOOLS_AGENT_H_
6 #define CONTENT_CHILD_SHARED_WORKER_DEVTOOLS_AGENT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DEVTOOLS_AGENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 namespace IPC { 12 namespace IPC {
13 class Message; 13 class Message;
14 } 14 }
15 15
16 namespace blink { 16 namespace blink {
17 class WebSharedWorker; 17 class WebEmbeddedWorker;
18 class WebString; 18 class WebString;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 22
23 class SharedWorkerDevToolsAgent { 23 class EmbeddedWorkerDevToolsAgent {
24 public: 24 public:
25 SharedWorkerDevToolsAgent(int route_id, blink::WebSharedWorker*); 25 EmbeddedWorkerDevToolsAgent(blink::WebEmbeddedWorker* webworker);
26 ~SharedWorkerDevToolsAgent(); 26 ~EmbeddedWorkerDevToolsAgent();
27 27
28 // Called on the Worker thread.
29 bool OnMessageReceived(const IPC::Message& message); 28 bool OnMessageReceived(const IPC::Message& message);
30 void SendDevToolsMessage(const blink::WebString&);
31 void SaveDevToolsAgentState(const blink::WebString& state);
32 29
33 private: 30 private:
34 void OnAttach(); 31 void OnAttach();
35 void OnReattach(const std::string&); 32 void OnReattach(const std::string&);
36 void OnDetach(); 33 void OnDetach();
37 void OnDispatchOnInspectorBackend(const std::string& message); 34 void OnDispatchOnInspectorBackend(const std::string& message);
38 void OnResumeWorkerContext(); 35 void OnResumeWorkerContext();
39 36
40 bool Send(IPC::Message* message); 37 blink::WebEmbeddedWorker* webworker_;
41 const int route_id_;
42 blink::WebSharedWorker* webworker_;
43 38
44 DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgent); 39 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDevToolsAgent);
45 }; 40 };
46 41
47 } // namespace content 42 } // namespace content
48 43
49 #endif // CONTENT_CHILD_SHARED_WORKER_DEVTOOLS_AGENT_H_ 44 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DEVTOOLS_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698