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
|
|
|
|
|
|
|
|
#include "include/cef_dom.h"
|
2013-06-22 04:06:32 +02:00
|
|
|
#include "third_party/WebKit/public/web/WebNode.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;
|
|
|
|
CefString GetFormControlElementType() override;
|
|
|
|
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_
|