2012-04-27 23:19:06 +02:00
|
|
|
// 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
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/cef_dom.h"
|
2018-04-19 17:44:42 +02:00
|
|
|
#include "third_party/blink/public/web/web_node.h"
|
2012-04-27 23:19:06 +02:00
|
|
|
|
|
|
|
class CefDOMDocumentImpl;
|
|
|
|
|
|
|
|
class CefDOMNodeImpl : public CefDOMNode {
|
|
|
|
public:
|
|
|
|
CefDOMNodeImpl(CefRefPtr<CefDOMDocumentImpl> document,
|
2013-11-08 22:28:56 +01:00
|
|
|
const blink::WebNode& node);
|
2014-11-12 20:25:15 +01:00
|
|
|
~CefDOMNodeImpl() override;
|
2012-04-27 23:19:06 +02:00
|
|
|
|
|
|
|
// CefDOMNode methods.
|
2014-11-12 20:25:15 +01:00
|
|
|
Type GetType() override;
|
|
|
|
bool IsText() override;
|
|
|
|
bool IsElement() override;
|
|
|
|
bool IsEditable() override;
|
|
|
|
bool IsFormControlElement() override;
|
2023-10-19 20:08:48 +02:00
|
|
|
FormControlType GetFormControlElementType() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
bool IsSame(CefRefPtr<CefDOMNode> that) override;
|
|
|
|
CefString GetName() override;
|
|
|
|
CefString GetValue() override;
|
|
|
|
bool SetValue(const CefString& value) override;
|
|
|
|
CefString GetAsMarkup() override;
|
|
|
|
CefRefPtr<CefDOMDocument> GetDocument() override;
|
|
|
|
CefRefPtr<CefDOMNode> GetParent() override;
|
|
|
|
CefRefPtr<CefDOMNode> GetPreviousSibling() override;
|
|
|
|
CefRefPtr<CefDOMNode> GetNextSibling() override;
|
|
|
|
bool HasChildren() override;
|
|
|
|
CefRefPtr<CefDOMNode> GetFirstChild() override;
|
|
|
|
CefRefPtr<CefDOMNode> 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;
|
2016-09-09 20:02:57 +02:00
|
|
|
CefRect GetElementBounds() override;
|
2012-04-27 23:19:06 +02:00
|
|
|
|
|
|
|
// 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<CefDOMDocumentImpl> document_;
|
2013-11-08 22:28:56 +01:00
|
|
|
blink::WebNode node_;
|
2012-04-27 23:19:06 +02:00
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefDOMNodeImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_DOM_NODE_IMPL_H_
|