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

Unified Diff: headless/lib/browser/headless_browser_main_parts.cc

Issue 2181413002: [headless] Remove default browser context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fixes 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_browser_main_parts.cc
diff --git a/headless/lib/browser/headless_browser_main_parts.cc b/headless/lib/browser/headless_browser_main_parts.cc
index c970b7907392e9329ec43a8c69f4cf846ea9f149..1b9e604895bd44b375042a5e4c2fc10c055a980f 100644
--- a/headless/lib/browser/headless_browser_main_parts.cc
+++ b/headless/lib/browser/headless_browser_main_parts.cc
@@ -8,6 +8,7 @@
#include "headless/lib/browser/headless_browser_context_impl.h"
#include "headless/lib/browser/headless_browser_impl.h"
#include "headless/lib/browser/headless_devtools.h"
+#include "headless/lib/browser/headless_devtools_manager_delegate.h"
#include "headless/lib/browser/headless_screen.h"
#include "ui/aura/env.h"
#include "ui/display/screen.h"
@@ -32,24 +33,17 @@ HeadlessBrowserMainParts::HeadlessBrowserMainParts(HeadlessBrowserImpl* browser)
HeadlessBrowserMainParts::~HeadlessBrowserMainParts() {}
void HeadlessBrowserMainParts::PreMainMessageLoopRun() {
- browser_context_.reset(new HeadlessBrowserContextImpl(ProtocolHandlerMap(),
- browser_->options()));
if (browser_->options()->devtools_endpoint.address().IsValid()) {
devtools_http_handler_ =
- CreateLocalDevToolsHttpHandler(browser_context_.get());
+ CreateLocalDevToolsHttpHandler(browser_->options());
}
PlatformInitialize();
}
void HeadlessBrowserMainParts::PostMainMessageLoopRun() {
- browser_context_.reset();
devtools_http_handler_.reset();
- PlatformExit();
-}
-HeadlessBrowserContextImpl* HeadlessBrowserMainParts::default_browser_context()
- const {
- return browser_context_.get();
+ PlatformExit();
}
} // namespace headless

Powered by Google App Engine
This is Rietveld 408576698