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

Side by Side Diff: content/browser/devtools/protocol/browser_handler.h

Issue 2436763003: [DevTools] Remove Browser domain, switch clients to Target. (Closed)
Patch Set: include, rebase Created 4 years, 1 month 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/protocol/browser_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_
7
8 #include <stdint.h>
9
10 #include "base/memory/weak_ptr.h"
11 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
12 #include "content/public/browser/devtools_agent_host.h"
13
14 namespace net {
15 class ServerSocket;
16 }
17
18 // Windows headers will redefine SendMessage.
19 #ifdef SendMessage
20 #undef SendMessage
21 #endif
22
23 namespace content {
24 namespace devtools {
25 namespace browser {
26
27 class BrowserHandler : public DevToolsAgentHostClient {
28 public:
29 using Response = DevToolsProtocolClient::Response;
30
31 BrowserHandler();
32 ~BrowserHandler() override;
33
34 void SetClient(std::unique_ptr<Client> client);
35 void Detached();
36
37 Response CreateBrowserContext(std::string* out_context_id);
38 Response DisposeBrowserContext(const std::string& context_id,
39 bool* out_success);
40 Response CreateTarget(const std::string& url,
41 const int* width,
42 const int* height,
43 const std::string* context_id,
44 std::string* out_target_id);
45 Response CloseTarget(const std::string& target_id, bool* out_success);
46 Response GetTargets(DevToolsCommandId command_id);
47 Response Attach(DevToolsCommandId command_id,
48 const std::string& target_id);
49 Response Detach(const std::string& target_id, bool* out_success);
50 Response SendMessage(const std::string& target_id,
51 const std::string& message);
52
53 private:
54 void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
55 const std::string& message) override;
56
57 void AgentHostClosed(DevToolsAgentHost* agent_host,
58 bool replaced_with_another_client) override;
59
60 void RespondToGetTargets(DevToolsCommandId command_id,
61 DevToolsAgentHost::List list);
62 void RespondToAttach(DevToolsCommandId command_id,
63 const std::string& target_id,
64 DevToolsAgentHost::List agents);
65
66 std::unique_ptr<Client> client_;
67 DevToolsAgentHost::List attached_hosts_;
68 base::WeakPtrFactory<BrowserHandler> weak_factory_;
69 DISALLOW_COPY_AND_ASSIGN(BrowserHandler);
70 };
71
72 } // namespace browser
73 } // namespace devtools
74 } // namespace content
75
76 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/devtools/protocol/browser_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698