author Julian Seward <>
Tue, 24 Jan 2017 17:10:01 +0100
changeset 330880 a9f258d042482099bbbd9bfd235efbf742959df0
parent 272372 85e218929a7a10851b83487c3b622b26f490c544
child 407866 8d4fc252d03a3d67979e3640f043c461244b2004
permissions -rw-r--r--
Bug 1232696 - Remove NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW as it causes segfaulting for GCC 6 builds (1 of 5, fixes for view/). r=tnikkel.

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

#ifndef mozilla_dom_ClipboardEvent_h_
#define mozilla_dom_ClipboardEvent_h_

#include "mozilla/EventForwards.h"
#include "mozilla/dom/ClipboardEventBinding.h"
#include "mozilla/dom/Event.h"
#include "nsIDOMClipboardEvent.h"

namespace mozilla {
namespace dom {
class DataTransfer;

class ClipboardEvent : public Event,
                       public nsIDOMClipboardEvent
  ClipboardEvent(EventTarget* aOwner,
                 nsPresContext* aPresContext,
                 InternalClipboardEvent* aEvent);



  // Forward to base class

  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
    return ClipboardEventBinding::Wrap(aCx, this, aGivenProto);

  static already_AddRefed<ClipboardEvent>
  Constructor(const GlobalObject& aGlobal,
              const nsAString& aType,
              const ClipboardEventInit& aParam,
              ErrorResult& aRv);

  DataTransfer* GetClipboardData();

  void InitClipboardEvent(const nsAString& aType, bool aCanBubble,
                          bool aCancelable,
                          DataTransfer* aClipboardData);

  ~ClipboardEvent() {}

} // namespace dom
} // namespace mozilla

NS_NewDOMClipboardEvent(mozilla::dom::EventTarget* aOwner,
                        nsPresContext* aPresContext,
                        mozilla::InternalClipboardEvent* aEvent);

#endif // mozilla_dom_ClipboardEvent_h_