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

Side by Side Diff: headless/public/web_node.h

Issue 1461693003: [headless] Initial skeleton of headless/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pure virtual indeed Created 5 years, 1 month 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
« headless/public/web_frame.h ('K') | « headless/public/web_frame.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 2015 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 HEADLESS_PUBLIC_WEB_NODE_H_
6 #define HEADLESS_PUBLIC_WEB_NODE_H_
7
8 #include "headless/public/headless_export.h"
9 #include "third_party/WebKit/public/web/WebNode.h"
10
11 namespace headless {
12
13 class WebElement;
14 class WebDocument;
15
16 class HEADLESS_EXPORT WebNode {
17 public:
18 WebNode(const blink::WebNode&);
19
20 std::string Value() const;
21
22 WebNode Parent() const;
23 WebNode FirstChild() const;
24 WebNode LastChild() const;
25 WebNode NextSibling() const;
26 WebNode PreviousSibling() const;
27 bool HasChildNodes() const;
28
29 bool IsDocument() const;
30 bool IsElement() const;
31
32 WebElement AsElement() const;
33 WebDocument AsDocument() const;
34
35 inline bool operator==(const WebNode& other) const {
36 return web_node() == other.web_node();
37 }
38 inline bool operator!=(const WebNode& other) const {
39 return !(*this == other);
40 }
41
42 protected:
43 blink::WebNode& web_node();
44 const blink::WebNode& web_node() const;
45
46 blink::WebNode web_node_;
47 };
48
49 } // namespace headless
50
51 #endif // HEADLESS_PUBLIC_WEB_NODE_H_
OLDNEW
« headless/public/web_frame.h ('K') | « headless/public/web_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698