// Copyright (c) 2012 The Chromium Embedded Framework 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 CEF_LIBCEF_DOM_NODE_IMPL_H_ #define CEF_LIBCEF_DOM_NODE_IMPL_H_ #pragma once #include "include/cef_dom.h" #include "third_party/blink/public/web/web_node.h" class CefDOMDocumentImpl; class CefDOMNodeImpl : public CefDOMNode { public: CefDOMNodeImpl(CefRefPtr document, const blink::WebNode& node); ~CefDOMNodeImpl() override; // CefDOMNode methods. Type GetType() override; bool IsText() override; bool IsElement() override; bool IsEditable() override; bool IsFormControlElement() override; FormControlType GetFormControlElementType() override; bool IsSame(CefRefPtr that) override; CefString GetName() override; CefString GetValue() override; bool SetValue(const CefString& value) override; CefString GetAsMarkup() override; CefRefPtr GetDocument() override; CefRefPtr GetParent() override; CefRefPtr GetPreviousSibling() override; CefRefPtr GetNextSibling() override; bool HasChildren() override; CefRefPtr GetFirstChild() override; CefRefPtr GetLastChild() override; CefString GetElementTagName() override; bool HasElementAttributes() override; bool HasElementAttribute(const CefString& attrName) override; CefString GetElementAttribute(const CefString& attrName) override; void GetElementAttributes(AttributeMap& attrMap) override; bool SetElementAttribute(const CefString& attrName, const CefString& value) override; CefString GetElementInnerText() override; CefRect GetElementBounds() override; // Will be called from CefDOMDocumentImpl::Detach(). void Detach(); // Verify that the object exists and is being accessed on the UI thread. bool VerifyContext(); protected: CefRefPtr document_; blink::WebNode node_; IMPLEMENT_REFCOUNTING(CefDOMNodeImpl); }; #endif // CEF_LIBCEF_DOM_NODE_IMPL_H_