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

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

Issue 2780433002: add print to pdf for headless (Closed)
Patch Set: improve comments as suggested Created 3 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
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 "headless/app/headless_shell_switches.h" 5 #include "headless/app/headless_shell_switches.h"
6 6
7 namespace headless { 7 namespace headless {
8 namespace switches { 8 namespace switches {
9 9
10 // The directory breakpad should store minidumps in. 10 // The directory breakpad should store minidumps in.
11 const char kCrashDumpsDir[] = "crash-dumps-dir"; 11 const char kCrashDumpsDir[] = "crash-dumps-dir";
12 12
13 // Instructs headless_shell to cause network fetches to complete in order of 13 // Instructs headless_shell to cause network fetches to complete in order of
14 // creation. This removes a significant source of network related 14 // creation. This removes a significant source of network related
15 // non-determinism at the cost of slower page loads. 15 // non-determinism at the cost of slower page loads.
16 const char kDeterministicFetch[] = "deterministic-fetch"; 16 const char kDeterministicFetch[] = "deterministic-fetch";
17 17
18 // Instructs headless_shell to print document.body.innerHTML to stdout. 18 // Instructs headless_shell to print document.body.innerHTML to stdout.
19 const char kDumpDom[] = "dump-dom"; 19 const char kDumpDom[] = "dump-dom";
20 20
21 // Hide scrollbars from screenshots. 21 // Hide scrollbars from screenshots.
22 const char kHideScrollbars[] = "hide-scrollbars"; 22 const char kHideScrollbars[] = "hide-scrollbars";
23 23
24 // Save a pdf file of the loaded page.
25 const char kPrintToPDF[] = "print-to-pdf";
26
24 // Uses a specified proxy server, overrides system settings. This switch only 27 // Uses a specified proxy server, overrides system settings. This switch only
25 // affects HTTP and HTTPS requests. 28 // affects HTTP and HTTPS requests.
26 const char kProxyServer[] = "proxy-server"; 29 const char kProxyServer[] = "proxy-server";
27 30
28 // Use the given address instead of the default loopback for accepting remote 31 // Use the given address instead of the default loopback for accepting remote
29 // debugging connections. Should be used together with --remote-debugging-port. 32 // debugging connections. Should be used together with --remote-debugging-port.
30 // Note that the remote debugging protocol does not perform any authentication, 33 // Note that the remote debugging protocol does not perform any authentication,
31 // so exposing it too widely can be a security risk. 34 // so exposing it too widely can be a security risk.
32 const char kRemoteDebuggingAddress[] = "remote-debugging-address"; 35 const char kRemoteDebuggingAddress[] = "remote-debugging-address";
33 36
(...skipping 21 matching lines...) Expand all
55 // network fetches have completed, timers fire and if the system runs out of 58 // network fetches have completed, timers fire and if the system runs out of
56 // virtual time is fastforwarded so the next timer fires immediatley, until the 59 // virtual time is fastforwarded so the next timer fires immediatley, until the
57 // specified virtual time budget is exhausted. 60 // specified virtual time budget is exhausted.
58 const char kVirtualTimeBudget[] = "virtual-time-budget"; 61 const char kVirtualTimeBudget[] = "virtual-time-budget";
59 62
60 // Sets the initial window size. Provided as string in the format "800,600". 63 // Sets the initial window size. Provided as string in the format "800,600".
61 const char kWindowSize[] = "window-size"; 64 const char kWindowSize[] = "window-size";
62 65
63 } // namespace switches 66 } // namespace switches
64 } // namespace headless 67 } // namespace headless
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698