2013-07-03 00:24:32 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=4 sw=4 et 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 http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_jsipc_JavaScriptParent__
|
|
|
|
#define mozilla_jsipc_JavaScriptParent__
|
|
|
|
|
2014-05-16 16:40:36 -07:00
|
|
|
#include "JavaScriptBase.h"
|
2013-07-03 00:24:32 -07:00
|
|
|
#include "mozilla/jsipc/PJavaScriptParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace jsipc {
|
|
|
|
|
2014-05-16 16:40:36 -07:00
|
|
|
class JavaScriptParent : public JavaScriptBase<PJavaScriptParent>
|
2013-07-03 00:24:32 -07:00
|
|
|
{
|
|
|
|
public:
|
2014-08-31 18:10:16 -07:00
|
|
|
explicit JavaScriptParent(JSRuntime *rt);
|
2014-05-16 16:40:37 -07:00
|
|
|
virtual ~JavaScriptParent();
|
2013-07-03 00:24:32 -07:00
|
|
|
|
|
|
|
bool init();
|
2014-05-16 16:40:37 -07:00
|
|
|
void trace(JSTracer *trc);
|
2014-02-05 08:39:59 -08:00
|
|
|
|
2013-07-03 00:24:32 -07:00
|
|
|
void drop(JSObject *obj);
|
|
|
|
|
2013-06-03 03:14:37 -07:00
|
|
|
mozilla::ipc::IProtocol*
|
|
|
|
CloneProtocol(Channel* aChannel, ProtocolCloneContext* aCtx) MOZ_OVERRIDE;
|
2014-05-28 18:05:22 -07:00
|
|
|
|
|
|
|
protected:
|
2015-01-08 07:16:38 -08:00
|
|
|
virtual bool isParent() MOZ_OVERRIDE { return true; }
|
2014-09-12 17:41:18 -07:00
|
|
|
virtual JSObject *scopeForTargetObjects() MOZ_OVERRIDE;
|
2013-07-03 00:24:32 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // jsipc
|
|
|
|
} // mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_jsipc_JavaScriptWrapper_h__
|
|
|
|
|