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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: headless/public/web_element.h
diff --git a/headless/public/web_element.h b/headless/public/web_element.h
new file mode 100644
index 0000000000000000000000000000000000000000..913b5f7dbd69242d46d587c557f3a50e15b8ae9c
--- /dev/null
+++ b/headless/public/web_element.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HEADLESS_PUBLIC_WEB_ELEMENT_H_
+#define HEADLESS_PUBLIC_WEB_ELEMENT_H_
+
+#include <map>
+
+#include "base/memory/scoped_ptr.h"
+#include "headless/public/headless_export.h"
+#include "headless/public/web_node.h"
+
+namespace blink {
+class WebElement;
+}
+
+namespace gfx {
+class Rect;
+}
+
+namespace headless {
+
+class HEADLESS_EXPORT WebElement : public WebNode {
+ public:
+ WebElement(const blink::WebElement& web_element);
alex clarke (OOO till 29th) 2015/11/19 18:17:54 nit: explicit for both of these
altimin 2015/11/19 18:36:24 Done.
+ WebElement(const WebElement& web_element);
+ ~WebElement();
+
+ std::string TagName() const;
+ gfx::Rect BoundingBox() const;
+ const std::map<std::string, std::string>& Attributes() const;
+
+ protected:
+ blink::WebElement& web_element();
+ const blink::WebElement& web_element() const;
+
+ private:
+ mutable scoped_ptr<std::map<std::string, std::string>> attributes_;
+};
+
+} // namespace headless
+
+#endif // HEADLESS_PUBLIC_WEB_ELEMENT_H_

Powered by Google App Engine
This is Rietveld 408576698