2009-11-17 17:22:23 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2009-11-17 17:22:23 +03:00
|
|
|
|
|
|
|
#ifndef TABMESSAGE_UTILS_H
|
|
|
|
#define TABMESSAGE_UTILS_H
|
|
|
|
|
|
|
|
#include "IPC/IPCMessageUtils.h"
|
2012-06-11 03:44:50 +04:00
|
|
|
#include "nsIDOMEvent.h"
|
2009-11-17 17:22:23 +03:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
|
2011-06-08 23:56:31 +04:00
|
|
|
#ifdef MOZ_CRASHREPORTER
|
|
|
|
#include "nsExceptionHandler.h"
|
|
|
|
#endif
|
|
|
|
|
2009-11-17 17:22:23 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
struct RemoteDOMEvent
|
|
|
|
{
|
2012-06-11 03:44:50 +04:00
|
|
|
nsCOMPtr<nsIDOMEvent> mEvent;
|
2009-11-17 17:22:23 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
bool ReadRemoteEvent(const IPC::Message* aMsg, void** aIter,
|
|
|
|
mozilla::dom::RemoteDOMEvent* aResult);
|
|
|
|
|
2011-06-08 23:56:31 +04:00
|
|
|
#ifdef MOZ_CRASHREPORTER
|
|
|
|
typedef CrashReporter::ThreadId NativeThreadId;
|
|
|
|
#else
|
|
|
|
// unused in this case
|
|
|
|
typedef int32 NativeThreadId;
|
|
|
|
#endif
|
|
|
|
|
2009-11-17 17:22:23 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace IPC {
|
|
|
|
|
|
|
|
template<>
|
|
|
|
struct ParamTraits<mozilla::dom::RemoteDOMEvent>
|
|
|
|
{
|
|
|
|
typedef mozilla::dom::RemoteDOMEvent paramType;
|
|
|
|
|
|
|
|
static void Write(Message* aMsg, const paramType& aParam)
|
|
|
|
{
|
2011-10-17 18:59:28 +04:00
|
|
|
aParam.mEvent->Serialize(aMsg, true);
|
2009-11-17 17:22:23 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
|
|
|
|
{
|
|
|
|
return mozilla::dom::ReadRemoteEvent(aMsg, aIter, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void Log(const paramType& aParam, std::wstring* aLog)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|