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

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

Issue 2300703005: DevTools: merge devtools_http_handler into content - it is used in all the embedders anyways. (Closed)
Patch Set: for_landing! Created 4 years, 3 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 | « content/browser/BUILD.gn ('k') | content/browser/devtools/devtools_agent_host_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 bool AttachClient(DevToolsAgentHostClient* client) override; 38 bool AttachClient(DevToolsAgentHostClient* client) override;
39 void ForceAttachClient(DevToolsAgentHostClient* client) override; 39 void ForceAttachClient(DevToolsAgentHostClient* client) override;
40 bool DetachClient(DevToolsAgentHostClient* client) override; 40 bool DetachClient(DevToolsAgentHostClient* client) override;
41 bool DispatchProtocolMessage(DevToolsAgentHostClient* client, 41 bool DispatchProtocolMessage(DevToolsAgentHostClient* client,
42 const std::string& message) override; 42 const std::string& message) override;
43 bool IsAttached() override; 43 bool IsAttached() override;
44 void InspectElement(DevToolsAgentHostClient* client, int x, int y) override; 44 void InspectElement(DevToolsAgentHostClient* client, int x, int y) override;
45 std::string GetId() override; 45 std::string GetId() override;
46 std::string GetParentId() override; 46 std::string GetParentId() override;
47 std::string GetDescription() override; 47 std::string GetDescription() override;
48 void SetDescriptionOverride(const std::string& description) override;
49 GURL GetFaviconURL() override; 48 GURL GetFaviconURL() override;
50 base::TimeTicks GetLastActivityTime() override; 49 base::TimeTicks GetLastActivityTime() override;
51 BrowserContext* GetBrowserContext() override; 50 BrowserContext* GetBrowserContext() override;
52 WebContents* GetWebContents() override; 51 WebContents* GetWebContents() override;
53 void DisconnectWebContents() override; 52 void DisconnectWebContents() override;
54 void ConnectWebContents(WebContents* wc) override; 53 void ConnectWebContents(WebContents* wc) override;
55 bool Inspect() override; 54 bool Inspect() override;
56 55
57 // DevToolsProtocolDelegate implementation. 56 // DevToolsProtocolDelegate implementation.
58 void SendProtocolResponse(int session_id, 57 void SendProtocolResponse(int session_id,
(...skipping 15 matching lines...) Expand all
74 73
75 static void NotifyCallbacks(DevToolsAgentHostImpl* agent_host, bool attached); 74 static void NotifyCallbacks(DevToolsAgentHostImpl* agent_host, bool attached);
76 75
77 private: 76 private:
78 friend class DevToolsAgentHost; // for static methods 77 friend class DevToolsAgentHost; // for static methods
79 bool InnerAttach(DevToolsAgentHostClient* client, bool force); 78 bool InnerAttach(DevToolsAgentHostClient* client, bool force);
80 void InnerDetach(); 79 void InnerDetach();
81 80
82 const std::string id_; 81 const std::string id_;
83 int session_id_; 82 int session_id_;
84 std::string description_;
85 DevToolsAgentHostClient* client_; 83 DevToolsAgentHostClient* client_;
86 devtools::DevToolsIOContext io_context_; 84 devtools::DevToolsIOContext io_context_;
87 }; 85 };
88 86
89 class DevToolsMessageChunkProcessor { 87 class DevToolsMessageChunkProcessor {
90 public: 88 public:
91 using SendMessageCallback = base::Callback<void(int, const std::string&)>; 89 using SendMessageCallback = base::Callback<void(int, const std::string&)>;
92 explicit DevToolsMessageChunkProcessor(const SendMessageCallback& callback); 90 explicit DevToolsMessageChunkProcessor(const SendMessageCallback& callback);
93 ~DevToolsMessageChunkProcessor(); 91 ~DevToolsMessageChunkProcessor();
94 92
95 std::string state_cookie() const { return state_cookie_; } 93 std::string state_cookie() const { return state_cookie_; }
96 void set_state_cookie(const std::string& cookie) { state_cookie_ = cookie; } 94 void set_state_cookie(const std::string& cookie) { state_cookie_ = cookie; }
97 int last_call_id() const { return last_call_id_; } 95 int last_call_id() const { return last_call_id_; }
98 bool ProcessChunkedMessageFromAgent(const DevToolsMessageChunk& chunk); 96 bool ProcessChunkedMessageFromAgent(const DevToolsMessageChunk& chunk);
99 97
100 private: 98 private:
101 SendMessageCallback callback_; 99 SendMessageCallback callback_;
102 std::string message_buffer_; 100 std::string message_buffer_;
103 uint32_t message_buffer_size_; 101 uint32_t message_buffer_size_;
104 std::string state_cookie_; 102 std::string state_cookie_;
105 int last_call_id_; 103 int last_call_id_;
106 }; 104 };
107 105
108 } // namespace content 106 } // namespace content
109 107
110 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 108 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698