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

Side by Side Diff: third_party/WebKit/public/web/WebLocalFrame.h

Issue 2116283002: Don't let rounding prematurely influence document size when printing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@620456-2
Patch Set: bug 467579 Created 4 years, 5 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 WebLocalFrame_h 5 #ifndef WebLocalFrame_h
6 #define WebLocalFrame_h 6 #define WebLocalFrame_h
7 7
8 #include "WebFrame.h" 8 #include "WebFrame.h"
9 #include "WebFrameLoadType.h" 9 #include "WebFrameLoadType.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class WebAutofillClient; 13 class WebAutofillClient;
14 class WebContentSettingsClient; 14 class WebContentSettingsClient;
15 class WebDevToolsAgent; 15 class WebDevToolsAgent;
16 class WebDevToolsAgentClient; 16 class WebDevToolsAgentClient;
17 class WebFrameClient; 17 class WebFrameClient;
18 class WebNode; 18 class WebNode;
19 class WebScriptExecutionCallback; 19 class WebScriptExecutionCallback;
20 class WebSuspendableTask; 20 class WebSuspendableTask;
21 class WebWidget; 21 class WebWidget;
22 enum class WebAppBannerPromptReply; 22 enum class WebAppBannerPromptReply;
23 enum class WebCachePolicy; 23 enum class WebCachePolicy;
24 enum class WebSandboxFlags; 24 enum class WebSandboxFlags;
25 enum class WebTreeScopeType; 25 enum class WebTreeScopeType;
26 struct WebDoubleSize;
26 struct WebPrintPresetOptions; 27 struct WebPrintPresetOptions;
27 28
28 // Interface for interacting with in process frames. This contains methods that 29 // Interface for interacting with in process frames. This contains methods that
29 // require interacting with a frame's document. 30 // require interacting with a frame's document.
30 // FIXME: Move lots of methods from WebFrame in here. 31 // FIXME: Move lots of methods from WebFrame in here.
31 class WebLocalFrame : public WebFrame { 32 class WebLocalFrame : public WebFrame {
32 public: 33 public:
33 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). 34 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close().
34 // It is valid to pass a null client pointer. 35 // It is valid to pass a null client pointer.
35 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType, WebFrameClient*, WebFrame* opener = nullptr); 36 BLINK_EXPORT static WebLocalFrame* create(WebTreeScopeType, WebFrameClient*, WebFrame* opener = nullptr);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 virtual bool isPageBoxVisible(int pageIndex) = 0; 152 virtual bool isPageBoxVisible(int pageIndex) = 0;
152 153
153 // Returns true if the page style has custom size information. 154 // Returns true if the page style has custom size information.
154 virtual bool hasCustomPageSizeStyle(int pageIndex) = 0; 155 virtual bool hasCustomPageSizeStyle(int pageIndex) = 0;
155 156
156 // Returns the preferred page size and margins in pixels, assuming 96 157 // Returns the preferred page size and margins in pixels, assuming 96
157 // pixels per inch. pageSize, marginTop, marginRight, marginBottom, 158 // pixels per inch. pageSize, marginTop, marginRight, marginBottom,
158 // marginLeft must be initialized to the default values that are used if 159 // marginLeft must be initialized to the default values that are used if
159 // auto is specified. 160 // auto is specified.
160 virtual void pageSizeAndMarginsInPixels(int pageIndex, 161 virtual void pageSizeAndMarginsInPixels(int pageIndex,
161 WebSize& pageSize, 162 WebDoubleSize& pageSize,
162 int& marginTop, 163 int& marginTop,
163 int& marginRight, 164 int& marginRight,
164 int& marginBottom, 165 int& marginBottom,
165 int& marginLeft) = 0; 166 int& marginLeft) = 0;
166 167
167 // Returns the value for a page property that is only defined when printing. 168 // Returns the value for a page property that is only defined when printing.
168 // printBegin must have been called before this method. 169 // printBegin must have been called before this method.
169 virtual WebString pageProperty(const WebString& propertyName, int pageIndex) = 0; 170 virtual WebString pageProperty(const WebString& propertyName, int pageIndex) = 0;
170 171
171 172
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // to call these on a WebLocalFrame. 429 // to call these on a WebLocalFrame.
429 bool isWebLocalFrame() const override = 0; 430 bool isWebLocalFrame() const override = 0;
430 WebLocalFrame* toWebLocalFrame() override = 0; 431 WebLocalFrame* toWebLocalFrame() override = 0;
431 bool isWebRemoteFrame() const override = 0; 432 bool isWebRemoteFrame() const override = 0;
432 WebRemoteFrame* toWebRemoteFrame() override = 0; 433 WebRemoteFrame* toWebRemoteFrame() override = 0;
433 }; 434 };
434 435
435 } // namespace blink 436 } // namespace blink
436 437
437 #endif // WebLocalFrame_h 438 #endif // WebLocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698