| Index: content/browser/devtools/protocol/browser_handler.h
|
| diff --git a/content/browser/devtools/protocol/browser_handler.h b/content/browser/devtools/protocol/browser_handler.h
|
| index ee14bfd9177fbaf2b14e28d456f12c11a57bb580..6e5b5dcfc03b6ee794eb170d4e19f18a288532b5 100644
|
| --- a/content/browser/devtools/protocol/browser_handler.h
|
| +++ b/content/browser/devtools/protocol/browser_handler.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include "base/memory/weak_ptr.h"
|
| #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
|
| #include "content/public/browser/devtools_agent_host.h"
|
|
|
| @@ -32,8 +33,6 @@ class BrowserHandler : public DevToolsAgentHostClient {
|
|
|
| void SetClient(std::unique_ptr<Client> client);
|
|
|
| - using TargetInfos = std::vector<scoped_refptr<devtools::browser::TargetInfo>>;
|
| -
|
| Response CreateBrowserContext(std::string* out_context_id);
|
| Response DisposeBrowserContext(const std::string& context_id,
|
| bool* out_success);
|
| @@ -41,12 +40,14 @@ class BrowserHandler : public DevToolsAgentHostClient {
|
| const int* width,
|
| const int* height,
|
| const std::string* context_id,
|
| - std::string* out_targetId);
|
| - Response CloseTarget(const std::string& targetId, bool* out_success);
|
| - Response GetTargets(TargetInfos* infos);
|
| - Response Attach(const std::string& targetId);
|
| - Response Detach(const std::string& targetId);
|
| - Response SendMessage(const std::string& targetId, const std::string& message);
|
| + std::string* out_target_id);
|
| + Response CloseTarget(const std::string& target_id, bool* out_success);
|
| + Response GetTargets(DevToolsCommandId command_id);
|
| + Response Attach(DevToolsCommandId command_id,
|
| + const std::string& target_id);
|
| + Response Detach(const std::string& target_id, bool* out_success);
|
| + Response SendMessage(const std::string& target_id,
|
| + const std::string& message);
|
|
|
| private:
|
| void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
|
| @@ -55,7 +56,15 @@ class BrowserHandler : public DevToolsAgentHostClient {
|
| void AgentHostClosed(DevToolsAgentHost* agent_host,
|
| bool replaced_with_another_client) override;
|
|
|
| + void RespondToGetTargets(DevToolsCommandId command_id,
|
| + DevToolsAgentHost::List list);
|
| + void RespondToAttach(DevToolsCommandId command_id,
|
| + const std::string& target_id,
|
| + DevToolsAgentHost::List agents);
|
| +
|
| std::unique_ptr<Client> client_;
|
| + DevToolsAgentHost::List attached_hosts_;
|
| + base::WeakPtrFactory<BrowserHandler> weak_factory_;
|
| DISALLOW_COPY_AND_ASSIGN(BrowserHandler);
|
| };
|
|
|
|
|