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

Side by Side Diff: content/browser/devtools/devtools_session.h

Issue 2708563002: DevTools: allow embedder handling async remote debugger commands. (Closed)
Patch Set: extract variable Created 3 years, 10 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
« no previous file with comments | « no previous file | content/browser/devtools/devtools_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/memory/weak_ptr.h"
6 #include "base/values.h"
5 #include "content/browser/devtools/protocol/devtools_domain_handler.h" 7 #include "content/browser/devtools/protocol/devtools_domain_handler.h"
6 #include "content/browser/devtools/protocol/protocol.h" 8 #include "content/browser/devtools/protocol/protocol.h"
7 9
8 namespace content { 10 namespace content {
9 11
10 class DevToolsAgentHostImpl; 12 class DevToolsAgentHostImpl;
11 class DevToolsAgentHostClient; 13 class DevToolsAgentHostClient;
12 class RenderFrameHostImpl; 14 class RenderFrameHostImpl;
13 15
14 class DevToolsSession : public protocol::FrontendChannel { 16 class DevToolsSession : public protocol::FrontendChannel {
(...skipping 11 matching lines...) Expand all
26 28
27 protocol::Response::Status Dispatch( 29 protocol::Response::Status Dispatch(
28 const std::string& message, 30 const std::string& message,
29 int* call_id, 31 int* call_id,
30 std::string* method); 32 std::string* method);
31 33
32 // Only used by DevToolsAgentHostImpl. 34 // Only used by DevToolsAgentHostImpl.
33 DevToolsAgentHostClient* client() const { return client_; } 35 DevToolsAgentHostClient* client() const { return client_; }
34 36
35 private: 37 private:
38 void sendResponse(std::unique_ptr<base::DictionaryValue> response);
36 // protocol::FrontendChannel implementation. 39 // protocol::FrontendChannel implementation.
37 void sendProtocolResponse( 40 void sendProtocolResponse(
38 int call_id, 41 int call_id,
39 std::unique_ptr<protocol::Serializable> message) override; 42 std::unique_ptr<protocol::Serializable> message) override;
40 void sendProtocolNotification( 43 void sendProtocolNotification(
41 std::unique_ptr<protocol::Serializable> message) override; 44 std::unique_ptr<protocol::Serializable> message) override;
42 void flushProtocolNotifications() override; 45 void flushProtocolNotifications() override;
43 46
44 DevToolsAgentHostImpl* agent_host_; 47 DevToolsAgentHostImpl* agent_host_;
45 DevToolsAgentHostClient* client_; 48 DevToolsAgentHostClient* client_;
46 int session_id_; 49 int session_id_;
47 std::unordered_map<std::string, 50 std::unordered_map<std::string,
48 std::unique_ptr<protocol::DevToolsDomainHandler>> handlers_; 51 std::unique_ptr<protocol::DevToolsDomainHandler>> handlers_;
49 RenderFrameHostImpl* host_; 52 RenderFrameHostImpl* host_;
50 std::unique_ptr<protocol::UberDispatcher> dispatcher_; 53 std::unique_ptr<protocol::UberDispatcher> dispatcher_;
54
55 base::WeakPtrFactory<DevToolsSession> weak_factory_;
51 }; 56 };
52 57
53 } // namespace content 58 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/devtools_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698