Index: headless/lib/browser/headless_devtools_manager_delegate.h |
diff --git a/headless/lib/browser/headless_devtools_manager_delegate.h b/headless/lib/browser/headless_devtools_manager_delegate.h |
index 6c2a65912567525a7e4dd173b3fb09b16898dec0..300cd2460080b721313de89470b085a6076d15cd 100644 |
--- a/headless/lib/browser/headless_devtools_manager_delegate.h |
+++ b/headless/lib/browser/headless_devtools_manager_delegate.h |
@@ -27,6 +27,9 @@ class HeadlessDevToolsManagerDelegate |
// DevToolsManagerDelegate implementation: |
base::DictionaryValue* HandleCommand(content::DevToolsAgentHost* agent_host, |
base::DictionaryValue* command) override; |
+ bool HandleAsyncCommand(content::DevToolsAgentHost* agent_host, |
+ base::DictionaryValue* command, |
+ const CommandCallback& callback) override; |
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget( |
const GURL& url) override; |
std::string GetDiscoveryPageHTML() override; |
@@ -45,6 +48,10 @@ class HeadlessDevToolsManagerDelegate |
std::unique_ptr<base::DictionaryValue> DisposeBrowserContext( |
int command_id, |
const base::DictionaryValue* params); |
+ void PrintToPDF(content::DevToolsAgentHost* agent_host, |
+ int command_id, |
+ const base::DictionaryValue* params, |
+ const CommandCallback& callback); |
base::WeakPtr<HeadlessBrowserImpl> browser_; |
@@ -52,7 +59,13 @@ class HeadlessDevToolsManagerDelegate |
base::Callback<std::unique_ptr<base::DictionaryValue>( |
int command_id, |
const base::DictionaryValue* params)>; |
+ using AsyncCommandMemberCallback = |
+ base::Callback<void(content::DevToolsAgentHost* agent_host, |
+ int command_id, |
+ const base::DictionaryValue* params, |
+ const CommandCallback& callback)>; |
std::map<std::string, CommandMemberCallback> command_map_; |
+ std::map<std::string, AsyncCommandMemberCallback> async_command_map_; |
}; |
} // namespace headless |