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

Side by Side Diff: headless/public/web_element.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
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_ELEMENT_H_
6 #define HEADLESS_PUBLIC_WEB_ELEMENT_H_
7
8 #include <map>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "headless/public/web_node.h"
12
13 namespace blink {
14 struct WebRect;
15 class WebElement;
16 }
17
18 namespace headless {
19
20 class WebElement : public WebNode {
21 public:
22 WebElement(const blink::WebElement& web_element);
23 WebElement(const WebElement& web_element);
24 ~WebElement();
25
26 std::string TagName() const;
27 // TODO(altimin): replace with headless::WebRect.
Sami 2015/11/19 14:08:35 This could also be a gfx::Rect.
altimin 2015/11/19 14:52:54 Done.
28 blink::WebRect BoundingBox() const;
29 const std::map<std::string, std::string>& Attributes() const;
Sami 2015/11/19 14:08:34 We'll probably want to turn this into an iterator
altimin 2015/11/19 14:52:54 But we also want to access individual attributes:
Sami 2015/11/19 15:42:44 Right, the problem is that making this a map requi
30
31 protected:
32 blink::WebElement& web_element();
33 const blink::WebElement& web_element() const;
34
35 private:
36 mutable scoped_ptr<std::map<std::string, std::string>> attributes_;
37 };
38
39 } // namespace headless
40
41 #endif // HEADLESS_PUBLIC_WEB_ELEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698