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

Side by Side Diff: content/browser/devtools/protocol/page_handler.h

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: nit change 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 Response GetNavigationHistory( 70 Response GetNavigationHistory(
71 int* current_index, 71 int* current_index,
72 std::unique_ptr<NavigationEntries>* entries) override; 72 std::unique_ptr<NavigationEntries>* entries) override;
73 Response NavigateToHistoryEntry(int entry_id) override; 73 Response NavigateToHistoryEntry(int entry_id) override;
74 74
75 void CaptureScreenshot( 75 void CaptureScreenshot(
76 Maybe<std::string> format, 76 Maybe<std::string> format,
77 Maybe<int> quality, 77 Maybe<int> quality,
78 Maybe<bool> from_surface, 78 Maybe<bool> from_surface,
79 std::unique_ptr<CaptureScreenshotCallback> callback) override; 79 std::unique_ptr<CaptureScreenshotCallback> callback) override;
80 void PrintToPDF(std::unique_ptr<PrintToPDFCallback> callback) override; 80 void PrintToPDF(Maybe<int> dpi,
Lei Zhang 2017/04/20 08:35:58 Not sure how well a DPI setting will be supported.
jzfeng 2017/04/27 06:56:05 Sadly setting different dpi's yield the same pdf f
Eric Seckler 2017/04/27 08:56:59 Lei: Would there be a way to specify a DPI setting
Lei Zhang 2017/04/27 22:17:46 Since we don't expose such a setting, I'd say it's
Eric Seckler 2017/04/28 08:13:06 Let's go without it for now then. I believe someon
81 Maybe<bool> landscape,
82 Maybe<bool> display_header_footer,
83 Maybe<bool> print_backgrounds,
84 Maybe<double> scale,
85 Maybe<String> paper_type,
86 Maybe<String> margin_type,
87 Maybe<double> margin_top,
88 Maybe<double> margin_bottom,
89 Maybe<double> margin_left,
90 Maybe<double> margin_right,
91 Maybe<String> page_ranges,
92 std::unique_ptr<PrintToPDFCallback> callback) override;
81 Response StartScreencast(Maybe<std::string> format, 93 Response StartScreencast(Maybe<std::string> format,
82 Maybe<int> quality, 94 Maybe<int> quality,
83 Maybe<int> max_width, 95 Maybe<int> max_width,
84 Maybe<int> max_height, 96 Maybe<int> max_height,
85 Maybe<int> every_nth_frame) override; 97 Maybe<int> every_nth_frame) override;
86 Response StopScreencast() override; 98 Response StopScreencast() override;
87 Response ScreencastFrameAck(int session_id) override; 99 Response ScreencastFrameAck(int session_id) override;
88 100
89 Response HandleJavaScriptDialog(bool accept, 101 Response HandleJavaScriptDialog(bool accept,
90 Maybe<std::string> prompt_text) override; 102 Maybe<std::string> prompt_text) override;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 NotificationRegistrar registrar_; 161 NotificationRegistrar registrar_;
150 base::WeakPtrFactory<PageHandler> weak_factory_; 162 base::WeakPtrFactory<PageHandler> weak_factory_;
151 163
152 DISALLOW_COPY_AND_ASSIGN(PageHandler); 164 DISALLOW_COPY_AND_ASSIGN(PageHandler);
153 }; 165 };
154 166
155 } // namespace protocol 167 } // namespace protocol
156 } // namespace content 168 } // namespace content
157 169
158 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ 170 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698