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

Side by Side Diff: headless/lib/browser/headless_browser_main_parts.cc

Issue 2810353003: Adds a command-line flag indicating an open and listening socket to (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into headlessport Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « headless/app/headless_shell_switches.cc ('k') | headless/lib/browser/headless_devtools.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "headless/lib/browser/headless_browser_main_parts.h" 5 #include "headless/lib/browser/headless_browser_main_parts.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "headless/lib/browser/headless_browser_context_impl.h" 9 #include "headless/lib/browser/headless_browser_context_impl.h"
10 #include "headless/lib/browser/headless_browser_impl.h" 10 #include "headless/lib/browser/headless_browser_impl.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void HeadlessBrowserMainParts::PreMainMessageLoopRun() { 23 void HeadlessBrowserMainParts::PreMainMessageLoopRun() {
24 const base::CommandLine* command_line = 24 const base::CommandLine* command_line =
25 base::CommandLine::ForCurrentProcess(); 25 base::CommandLine::ForCurrentProcess();
26 if (command_line->HasSwitch(switches::kLogNetLog)) { 26 if (command_line->HasSwitch(switches::kLogNetLog)) {
27 base::FilePath log_path = 27 base::FilePath log_path =
28 command_line->GetSwitchValuePath(switches::kLogNetLog); 28 command_line->GetSwitchValuePath(switches::kLogNetLog);
29 net_log_.reset(new HeadlessNetLog(log_path)); 29 net_log_.reset(new HeadlessNetLog(log_path));
30 } 30 }
31 31
32 if (browser_->options()->devtools_endpoint.address().IsValid()) { 32 if (browser_->options()->DevtoolsServerEnabled()) {
33 StartLocalDevToolsHttpHandler(browser_->options()); 33 StartLocalDevToolsHttpHandler(browser_->options());
34 devtools_http_handler_started_ = true; 34 devtools_http_handler_started_ = true;
35 } 35 }
36 browser_->PlatformInitialize(); 36 browser_->PlatformInitialize();
37 } 37 }
38 38
39 void HeadlessBrowserMainParts::PostMainMessageLoopRun() { 39 void HeadlessBrowserMainParts::PostMainMessageLoopRun() {
40 if (devtools_http_handler_started_) { 40 if (devtools_http_handler_started_) {
41 StopLocalDevToolsHttpHandler(); 41 StopLocalDevToolsHttpHandler();
42 devtools_http_handler_started_ = false; 42 devtools_http_handler_started_ = false;
43 } 43 }
44 } 44 }
45 45
46 } // namespace headless 46 } // namespace headless
OLDNEW
« no previous file with comments | « headless/app/headless_shell_switches.cc ('k') | headless/lib/browser/headless_devtools.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698