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 HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ |
6 #define HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const base::DictionaryValue* params); | 64 const base::DictionaryValue* params); |
65 std::unique_ptr<base::DictionaryValue> GetWindowForTarget( | 65 std::unique_ptr<base::DictionaryValue> GetWindowForTarget( |
66 int command_id, | 66 int command_id, |
67 const base::DictionaryValue* params); | 67 const base::DictionaryValue* params); |
68 std::unique_ptr<base::DictionaryValue> GetWindowBounds( | 68 std::unique_ptr<base::DictionaryValue> GetWindowBounds( |
69 int command_id, | 69 int command_id, |
70 const base::DictionaryValue* params); | 70 const base::DictionaryValue* params); |
71 std::unique_ptr<base::DictionaryValue> SetWindowBounds( | 71 std::unique_ptr<base::DictionaryValue> SetWindowBounds( |
72 int command_id, | 72 int command_id, |
73 const base::DictionaryValue* params); | 73 const base::DictionaryValue* params); |
| 74 std::unique_ptr<base::DictionaryValue> SetDownloadBehavior( |
| 75 int command_id, |
| 76 const base::DictionaryValue* params); |
| 77 std::unique_ptr<base::DictionaryValue> SetDownloadDirectory( |
| 78 int command_id, |
| 79 const base::DictionaryValue* params); |
| 80 |
74 void PrintToPDF(content::DevToolsAgentHost* agent_host, | 81 void PrintToPDF(content::DevToolsAgentHost* agent_host, |
75 int command_id, | 82 int command_id, |
76 const base::DictionaryValue* params, | 83 const base::DictionaryValue* params, |
77 const CommandCallback& callback); | 84 const CommandCallback& callback); |
78 | 85 |
79 base::WeakPtr<HeadlessBrowserImpl> browser_; | 86 base::WeakPtr<HeadlessBrowserImpl> browser_; |
80 | 87 |
81 using CommandMemberCallback = | 88 using CommandMemberCallback = |
82 base::Callback<std::unique_ptr<base::DictionaryValue>( | 89 base::Callback<std::unique_ptr<base::DictionaryValue>( |
83 int command_id, | 90 int command_id, |
84 const base::DictionaryValue* params)>; | 91 const base::DictionaryValue* params)>; |
85 using AsyncCommandMemberCallback = | 92 using AsyncCommandMemberCallback = |
86 base::Callback<void(content::DevToolsAgentHost* agent_host, | 93 base::Callback<void(content::DevToolsAgentHost* agent_host, |
87 int command_id, | 94 int command_id, |
88 const base::DictionaryValue* params, | 95 const base::DictionaryValue* params, |
89 const CommandCallback& callback)>; | 96 const CommandCallback& callback)>; |
90 std::map<std::string, CommandMemberCallback> command_map_; | 97 std::map<std::string, CommandMemberCallback> command_map_; |
91 std::map<std::string, AsyncCommandMemberCallback> async_command_map_; | 98 std::map<std::string, AsyncCommandMemberCallback> async_command_map_; |
92 }; | 99 }; |
93 | 100 |
94 } // namespace headless | 101 } // namespace headless |
95 | 102 |
96 #endif // HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ | 103 #endif // HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_MANAGER_DELEGATE_H_ |
OLD | NEW |