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

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

Issue 1672073003: Shunt string-dumping functions from WebFrame to a side class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added/updated TODOs. Created 4 years, 10 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 | « third_party/WebKit/public/web/WebFrame.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WebFrameContentDumper_h
6 #define WebFrameContentDumper_h
7
8 #include "public/platform/WebCommon.h"
9
10 namespace blink {
11
12 class WebLocalFrame;
13 class WebString;
14
15 // Functions in this class should only be used for
16 // testing purposes.
17 // The exceptions to this rule are tracked in http://crbug.com/585164.
18 class WebFrameContentDumper {
19 public:
20 // Control of layoutTreeAsText output
21 enum LayoutAsTextControl {
22 LayoutAsTextNormal = 0,
23 LayoutAsTextDebug = 1 << 0,
24 LayoutAsTextPrinting = 1 << 1,
25 LayoutAsTextWithLineTrees = 1 << 2
26 };
27 typedef unsigned LayoutAsTextControls;
28
29 // Returns the contents of this frame as a string. If the text is
30 // longer than maxChars, it will be clipped to that length. WARNING:
31 // This function may be slow depending on the number of characters
32 // retrieved and page complexity. For a typically sized page, expect
33 // it to take on the order of milliseconds.
34 //
35 // If there is room, subframe text will be recursively appended. Each
36 // frame will be separated by an empty line.
37 BLINK_EXPORT static WebString dumpFrameTreeAsText(WebLocalFrame*, size_t max Chars);
38
39 // Returns HTML text for the contents of this frame, generated
40 // from the DOM.
41 BLINK_EXPORT static WebString dumpAsMarkup(WebLocalFrame*);
42
43 // Returns a text representation of the render tree. This method is used
44 // to support layout tests.
45 BLINK_EXPORT static WebString dumpLayoutTreeAsText(WebLocalFrame*, LayoutAsT extControls toShow = LayoutAsTextNormal);
46 };
47
48 } // namespace blink
49
50 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698