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

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

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_content_browser_client.cc
diff --git a/headless/lib/browser/headless_content_browser_client.cc b/headless/lib/browser/headless_content_browser_client.cc
index 23ddee0d580d82b1e46cd70a0a8d56cc652c9916..4a52361a0efd4932d9f2a422e099c9060c1f26a9 100644
--- a/headless/lib/browser/headless_content_browser_client.cc
+++ b/headless/lib/browser/headless_content_browser_client.cc
@@ -30,7 +30,11 @@ content::BrowserMainParts* HeadlessContentBrowserClient::CreateBrowserMainParts(
content::DevToolsManagerDelegate*
HeadlessContentBrowserClient::GetDevToolsManagerDelegate() {
- return new HeadlessDevToolsManagerDelegate(browser_);
+ std::unique_ptr<HeadlessDevToolsManagerDelegate> devtools_manager_delegate =
Eric Seckler 2016/08/03 12:17:57 do we need a unique_ptr here? (I find it a little
altimin 2016/08/03 12:46:18 We're using unique_ptr to show that we're explicit
Eric Seckler 2016/08/03 13:55:30 Hm, I guess this was a misguided feeling influence
+ base::WrapUnique(new HeadlessDevToolsManagerDelegate(browser_));
+ browser_->set_devtools_manager_delegate(
+ devtools_manager_delegate->GetWeakPtr());
+ return devtools_manager_delegate.release();
}
} // namespace headless

Powered by Google App Engine
This is Rietveld 408576698