| OLD | NEW |
| 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 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" | 10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 BrowserHandler(); | 30 BrowserHandler(); |
| 31 ~BrowserHandler() override; | 31 ~BrowserHandler() override; |
| 32 | 32 |
| 33 void SetClient(std::unique_ptr<Client> client); | 33 void SetClient(std::unique_ptr<Client> client); |
| 34 | 34 |
| 35 using TargetInfos = std::vector<scoped_refptr<devtools::browser::TargetInfo>>; | 35 using TargetInfos = std::vector<scoped_refptr<devtools::browser::TargetInfo>>; |
| 36 | 36 |
| 37 Response CreateBrowserContext(std::string* out_context_id); | 37 Response CreateBrowserContext(std::string* out_context_id); |
| 38 Response DisposeBrowserContext(const std::string& context_id, | 38 Response DisposeBrowserContext(const std::string& context_id, |
| 39 bool* out_success); | 39 bool* out_success); |
| 40 Response CreateTarget(const std::string& initial_url, | 40 Response CreateTarget(const std::string& url, |
| 41 const int* width, | 41 const int* width, |
| 42 const int* height, | 42 const int* height, |
| 43 const std::string* context_id, | 43 const std::string* context_id, |
| 44 std::string* out_targetId); | 44 std::string* out_targetId); |
| 45 Response CloseTarget(const std::string& targetId, bool* out_success); | 45 Response CloseTarget(const std::string& targetId, bool* out_success); |
| 46 Response GetTargets(TargetInfos* infos); | 46 Response GetTargets(TargetInfos* infos); |
| 47 Response Attach(const std::string& targetId); | 47 Response Attach(const std::string& targetId); |
| 48 Response Detach(const std::string& targetId); | 48 Response Detach(const std::string& targetId); |
| 49 Response SendMessage(const std::string& targetId, const std::string& message); | 49 Response SendMessage(const std::string& targetId, const std::string& message); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 void DispatchProtocolMessage(DevToolsAgentHost* agent_host, | 52 void DispatchProtocolMessage(DevToolsAgentHost* agent_host, |
| 53 const std::string& message) override; | 53 const std::string& message) override; |
| 54 | 54 |
| 55 void AgentHostClosed(DevToolsAgentHost* agent_host, | 55 void AgentHostClosed(DevToolsAgentHost* agent_host, |
| 56 bool replaced_with_another_client) override; | 56 bool replaced_with_another_client) override; |
| 57 | 57 |
| 58 std::unique_ptr<Client> client_; | 58 std::unique_ptr<Client> client_; |
| 59 DISALLOW_COPY_AND_ASSIGN(BrowserHandler); | 59 DISALLOW_COPY_AND_ASSIGN(BrowserHandler); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace browser | 62 } // namespace browser |
| 63 } // namespace devtools | 63 } // namespace devtools |
| 64 } // namespace content | 64 } // namespace content |
| 65 | 65 |
| 66 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_ | 66 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_BROWSER_HANDLER_H_ |
| OLD | NEW |