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

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: Moved DEPS to correct directory 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 "third_party/WebKit/public/web/WebNode.h"
9
10 namespace headless {
11
12 class WebElement;
13 class WebDocument;
14
15 class WebNode {
16 public:
17 WebNode(const blink::WebNode&);
18
19 std::string Value() const;
20
21 WebNode Parent() const;
22 WebNode FirstChild() const;
23 WebNode LastChild() const;
24 WebNode NextSibling() const;
25 WebNode PreviousSibling() const;
26 bool HasChildNodes() const;
27
28 bool IsDocument() const;
29 bool IsElement() const;
30
31 WebElement AsElement() const;
32 WebDocument AsDocument() const;
33
34 inline bool operator==(const WebNode& other) const {
35 return web_node() == other.web_node();
36 }
37 inline bool operator!=(const WebNode& other) const {
38 return !(*this == other);
39 }
40
41 protected:
42 blink::WebNode& web_node();
43 const blink::WebNode& web_node() const;
44
45 blink::WebNode web_node_;
46 };
47
48 } // namespace headless
49
50 #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