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

Side by Side Diff: headless/app/headless_shell.cc

Issue 1891843004: [headless] AddWindowTreeClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to latest master Created 4 years, 8 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/BUILD.gn ('k') | headless/lib/browser/headless_browser_impl.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 bool RemoteDebuggingEnabled() const { 83 bool RemoteDebuggingEnabled() const {
84 const base::CommandLine& command_line = 84 const base::CommandLine& command_line =
85 *base::CommandLine::ForCurrentProcess(); 85 *base::CommandLine::ForCurrentProcess();
86 return command_line.HasSwitch(switches::kRemoteDebuggingPort); 86 return command_line.HasSwitch(switches::kRemoteDebuggingPort);
87 } 87 }
88 88
89 private: 89 private:
90 HeadlessBrowser* browser_; // Not owned. 90 HeadlessBrowser* browser_; // Not owned.
91 std::unique_ptr<HeadlessDevToolsClient> devtools_client_; 91 std::unique_ptr<HeadlessDevToolsClient> devtools_client_;
92 std::unique_ptr<HeadlessWebContents> web_contents_; 92 HeadlessWebContents* web_contents_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(HeadlessShell); 94 DISALLOW_COPY_AND_ASSIGN(HeadlessShell);
95 }; 95 };
96 96
97 int main(int argc, const char** argv) { 97 int main(int argc, const char** argv) {
98 HeadlessShell shell; 98 HeadlessShell shell;
99 HeadlessBrowser::Options::Builder builder(argc, argv); 99 HeadlessBrowser::Options::Builder builder(argc, argv);
100 100
101 // Enable devtools if requested. 101 // Enable devtools if requested.
102 base::CommandLine command_line(argc, argv); 102 base::CommandLine command_line(argc, argv);
(...skipping 21 matching lines...) Expand all
124 LOG(ERROR) << "Malformed proxy server url"; 124 LOG(ERROR) << "Malformed proxy server url";
125 return EXIT_FAILURE; 125 return EXIT_FAILURE;
126 } 126 }
127 builder.SetProxyServer(parsed_proxy_server); 127 builder.SetProxyServer(parsed_proxy_server);
128 } 128 }
129 129
130 return HeadlessBrowserMain( 130 return HeadlessBrowserMain(
131 builder.Build(), 131 builder.Build(),
132 base::Bind(&HeadlessShell::OnStart, base::Unretained(&shell))); 132 base::Bind(&HeadlessShell::OnStart, base::Unretained(&shell)));
133 } 133 }
OLDNEW
« no previous file with comments | « headless/BUILD.gn ('k') | headless/lib/browser/headless_browser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698