2013-07-03 11:24:32 +04: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-17 03:40:36 +04:00
|
|
|
#include "JavaScriptBase.h"
|
2013-07-03 11:24:32 +04:00
|
|
|
#include "mozilla/jsipc/PJavaScriptParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace jsipc {
|
|
|
|
|
2014-05-17 03:40:36 +04:00
|
|
|
class JavaScriptParent : public JavaScriptBase<PJavaScriptParent>
|
2013-07-03 11:24:32 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-03-29 01:22:11 +03:00
|
|
|
explicit JavaScriptParent(JSRuntime* rt);
|
2014-05-17 03:40:37 +04:00
|
|
|
virtual ~JavaScriptParent();
|
2013-07-03 11:24:32 +04:00
|
|
|
|
|
|
|
bool init();
|
2015-03-29 01:22:11 +03:00
|
|
|
void trace(JSTracer* trc);
|
2014-02-05 20:39:59 +04:00
|
|
|
|
2015-03-29 01:22:11 +03:00
|
|
|
void drop(JSObject* obj);
|
2013-07-03 11:24:32 +04:00
|
|
|
|
2013-06-03 14:14:37 +04:00
|
|
|
mozilla::ipc::IProtocol*
|
2015-03-21 19:28:04 +03:00
|
|
|
CloneProtocol(Channel* aChannel, ProtocolCloneContext* aCtx) override;
|
2014-05-29 05:05:22 +04:00
|
|
|
|
|
|
|
protected:
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool isParent() override { return true; }
|
2015-03-29 01:22:11 +03:00
|
|
|
virtual JSObject* scopeForTargetObjects() override;
|
2013-07-03 11:24:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // jsipc
|
|
|
|
} // mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_jsipc_JavaScriptWrapper_h__
|
|
|
|
|