michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* vim: set ts=8 sts=4 et sw=4 tw=99: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __CrossOriginWrapper_h__ michael@0: #define __CrossOriginWrapper_h__ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #include "jswrapper.h" michael@0: michael@0: namespace xpc { michael@0: michael@0: class WaiveXrayWrapper : public js::CrossCompartmentWrapper { michael@0: public: michael@0: WaiveXrayWrapper(unsigned flags); michael@0: virtual ~WaiveXrayWrapper(); michael@0: michael@0: virtual bool getPropertyDescriptor(JSContext *cx, JS::Handle wrapper, michael@0: JS::Handle id, michael@0: JS::MutableHandle desc) MOZ_OVERRIDE; michael@0: virtual bool getOwnPropertyDescriptor(JSContext *cx, JS::Handle wrapper, michael@0: JS::Handle id, michael@0: JS::MutableHandle desc) MOZ_OVERRIDE; michael@0: virtual bool get(JSContext *cx, JS::Handle wrapper, JS::Handle receiver, michael@0: JS::Handle id, JS::MutableHandle vp) MOZ_OVERRIDE; michael@0: michael@0: virtual bool call(JSContext *cx, JS::Handle wrapper, michael@0: const JS::CallArgs &args) MOZ_OVERRIDE; michael@0: virtual bool construct(JSContext *cx, JS::Handle wrapper, michael@0: const JS::CallArgs &args) MOZ_OVERRIDE; michael@0: michael@0: virtual bool nativeCall(JSContext *cx, JS::IsAcceptableThis test, michael@0: JS::NativeImpl impl, JS::CallArgs args) MOZ_OVERRIDE; michael@0: michael@0: virtual bool getPrototypeOf(JSContext *cx, JS::Handle wrapper, michael@0: JS::MutableHandle protop) MOZ_OVERRIDE; michael@0: michael@0: static WaiveXrayWrapper singleton; michael@0: }; michael@0: michael@0: } michael@0: michael@0: #endif