Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: headless/lib/browser/headless_devtools_manager_delegate.h

Issue 2181413002: [headless] Remove default browser context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes according to Sami's comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698