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 fa4cd17db794485638aabe2cac3439df64ec6138..e5c269720ea3bb42ece036addf149e7ca7e343d7 100644 |
--- a/headless/lib/browser/headless_devtools_manager_delegate.h |
+++ b/headless/lib/browser/headless_devtools_manager_delegate.h |
@@ -11,6 +11,7 @@ |
#include <memory> |
#include <string> |
+#include "base/memory/weak_ptr.h" |
#include "base/values.h" |
namespace headless { |
@@ -32,6 +33,11 @@ class HeadlessDevToolsManagerDelegate |
base::DictionaryValue* HandleCommand(content::DevToolsAgentHost* agent_host, |
base::DictionaryValue* command) override; |
+ // Delete owned browser contexts. |
+ void Shutdown(); |
+ |
+ base::WeakPtr<HeadlessDevToolsManagerDelegate> GetWeakPtr(); |
+ |
private: |
std::unique_ptr<base::Value> CreateTarget( |
const base::DictionaryValue* params); |
@@ -49,6 +55,10 @@ class HeadlessDevToolsManagerDelegate |
HeadlessDevToolsManagerDelegate::*)(const base::DictionaryValue* params); |
std::map<std::string, CommandMemberFnPtr> command_map_; |
+ |
+ std::unique_ptr<HeadlessBrowserContext> default_browser_context_; |
+ |
+ base::WeakPtrFactory<HeadlessDevToolsManagerDelegate> weak_ptr_factory_; |
}; |
} // namespace headless |