dom/bindings/test/TestCImplementedInterface.h
author Boris Zbarsky <bzbarsky@mit.edu>
Sat, 04 May 2013 21:44:10 -0400
changeset 130861 1a60a6e9d9b8bd5f6efb50f35410974236a58e7b
parent 129820 b84fe2eb61381c7c2191644eb85166bae33c8882
child 202997 ce5ae34c751b99d0cb3eb2eeb21cc1d5a72429e5
permissions -rw-r--r--
Bug 865785 part 2. Fix rooting issues in JS-implemented webidl. r=mccr8

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 http://mozilla.org/MPL/2.0/.
 */

#ifndef TestCImplementedInterface_h
#define TestCImplementedInterface_h

#include "../TestJSImplGenBinding.h"

class nsPIDOMWindow;

namespace mozilla {
namespace dom {

class TestCImplementedInterface : public TestJSImplInterface
{
public:
  TestCImplementedInterface(JS::Handle<JSObject*> aJSImpl,
                            nsPIDOMWindow* aParent)
    : TestJSImplInterface(aJSImpl, aParent)
  {}
};

class TestCImplementedInterface2 : public nsISupports,
                                   public nsWrapperCache
{
public:
  TestCImplementedInterface2(nsPIDOMWindow* aParent)
  {}
  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TestCImplementedInterface2)

  // We need a GetParentObject to make binding codegen happy
  nsISupports* GetParentObject();
};



} // namespace dom
} // namespace mozilla

#endif // TestCImplementedInterface_h