2011-02-23 04:45:13 +01:00
|
|
|
// Copyright (c) 2011 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.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#ifndef CEF_LIBCEF_DOM_EVENT_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_DOM_EVENT_IMPL_H_
|
|
|
|
#pragma once
|
2011-02-23 04:45:13 +01:00
|
|
|
|
2011-12-23 18:36:30 +01:00
|
|
|
#include "include/cef_dom.h"
|
2011-02-23 04:45:13 +01:00
|
|
|
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h"
|
|
|
|
|
|
|
|
class CefDOMDocumentImpl;
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
class CefDOMEventImpl : public CefDOMEvent {
|
|
|
|
public:
|
2011-02-23 04:45:13 +01:00
|
|
|
CefDOMEventImpl(CefRefPtr<CefDOMDocumentImpl> document,
|
|
|
|
const WebKit::WebDOMEvent& event);
|
|
|
|
virtual ~CefDOMEventImpl();
|
2012-01-10 00:46:23 +01:00
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
virtual CefString GetType() OVERRIDE;
|
|
|
|
virtual Category GetCategory() OVERRIDE;
|
|
|
|
virtual Phase GetPhase() OVERRIDE;
|
|
|
|
virtual bool CanBubble() OVERRIDE;
|
|
|
|
virtual bool CanCancel() OVERRIDE;
|
|
|
|
virtual CefRefPtr<CefDOMDocument> GetDocument() OVERRIDE;
|
|
|
|
virtual CefRefPtr<CefDOMNode> GetTarget() OVERRIDE;
|
|
|
|
virtual CefRefPtr<CefDOMNode> GetCurrentTarget() OVERRIDE;
|
2011-02-23 04:45:13 +01:00
|
|
|
|
|
|
|
// Will be called from CefDOMEventListenerWrapper::handleEvent().
|
|
|
|
void Detach();
|
|
|
|
|
|
|
|
// Verify that the object exists and is being accessed on the UI thread.
|
|
|
|
bool VerifyContext();
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
protected:
|
2011-02-23 04:45:13 +01:00
|
|
|
CefRefPtr<CefDOMDocumentImpl> document_;
|
|
|
|
WebKit::WebDOMEvent event_;
|
2011-05-20 16:42:25 +02:00
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefDOMEventImpl);
|
2011-02-23 04:45:13 +01:00
|
|
|
};
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
#endif // CEF_LIBCEF_DOM_EVENT_IMPL_H_
|