Bug 674725 - Part G - Add PSms IPDL sub-protocol. r=smaug sr=cjones

This commit is contained in:
Mounir Lamouri 2011-11-20 23:40:53 +01:00
Родитель d4a17bc900
Коммит 6c64cacfae
12 изменённых файлов: 254 добавлений и 1 удалений

Просмотреть файл

@ -111,11 +111,14 @@
#include "nsIAccessibilityService.h"
#endif
#include "mozilla/dom/sms/SmsChild.h"
using namespace mozilla::hal_sandbox;
using namespace mozilla::ipc;
using namespace mozilla::net;
using namespace mozilla::places;
using namespace mozilla::docshell;
using namespace mozilla::dom::sms;
namespace mozilla {
namespace dom {
@ -535,6 +538,19 @@ ContentChild::DeallocPExternalHelperApp(PExternalHelperAppChild* aService)
return true;
}
PSmsChild*
ContentChild::AllocPSms()
{
return new SmsChild();
}
bool
ContentChild::DeallocPSms(PSmsChild* aSms)
{
delete aSms;
return true;
}
PStorageChild*
ContentChild::AllocPStorage(const StorageConstructData& aData)
{

Просмотреть файл

@ -129,6 +129,9 @@ public:
const IPC::URI& aReferrer);
virtual bool DeallocPExternalHelperApp(PExternalHelperAppChild *aService);
virtual PSmsChild* AllocPSms();
virtual bool DeallocPSms(PSmsChild*);
virtual PStorageChild* AllocPStorage(const StorageConstructData& aData);
virtual bool DeallocPStorage(PStorageChild* aActor);

Просмотреть файл

@ -114,6 +114,8 @@
#include "nsIClipboard.h"
#include "nsWidgetsCID.h"
#include "nsISupportsPrimitives.h"
#include "mozilla/dom/sms/SmsParent.h"
static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID);
static const char* sClipboardTextFlavors[] = { kUnicodeMime };
@ -124,6 +126,7 @@ using namespace mozilla::net;
using namespace mozilla::places;
using mozilla::unused; // heh
using base::KillProcess;
using namespace mozilla::dom::sms;
namespace mozilla {
namespace dom {
@ -932,6 +935,19 @@ ContentParent::DeallocPExternalHelperApp(PExternalHelperAppParent* aService)
return true;
}
PSmsParent*
ContentParent::AllocPSms()
{
return new SmsParent();
}
bool
ContentParent::DeallocPSms(PSmsParent* aSms)
{
delete aSms;
return true;
}
PStorageParent*
ContentParent::AllocPStorage(const StorageConstructData& aData)
{

Просмотреть файл

@ -161,6 +161,9 @@ private:
const IPC::URI& aReferrer);
virtual bool DeallocPExternalHelperApp(PExternalHelperAppParent* aService);
virtual PSmsParent* AllocPSms();
virtual bool DeallocPSms(PSmsParent*);
virtual PStorageParent* AllocPStorage(const StorageConstructData& aData);
virtual bool DeallocPStorage(PStorageParent* aActor);

Просмотреть файл

@ -109,6 +109,7 @@ LOCAL_INCLUDES += \
-I$(topsrcdir)/dom/base \
-I$(topsrcdir)/toolkit/xre \
-I$(topsrcdir)/hal/sandbox \
-I$(topsrcdir)/dom/sms/src/ipc \
$(NULL)
DEFINES += -DBIN_SUFFIX='"$(BIN_SUFFIX)"'

Просмотреть файл

@ -43,6 +43,7 @@ include protocol PExternalHelperApp;
include protocol PHal;
include protocol PMemoryReportRequest;
include protocol PNecko;
include protocol PSms;
include protocol PStorage;
include protocol PTestShell;
@ -104,6 +105,7 @@ rpc protocol PContent
manages PHal;
manages PMemoryReportRequest;
manages PNecko;
manages PSms;
manages PStorage;
manages PTestShell;
@ -157,6 +159,8 @@ parent:
PHal();
PNecko();
PSms();
PStorage(StorageConstructData data);

Просмотреть файл

@ -37,7 +37,10 @@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
VPATH = \
$(srcdir) \
$(srcdir)/ipc \
$(NULL)
include $(DEPTH)/config/autoconf.mk
@ -57,6 +60,8 @@ EXPORTS_NAMESPACES = mozilla/dom/sms
EXPORTS_mozilla/dom/sms = \
SmsService.h \
SmsChild.h \
SmsParent.h \
$(NULL)
CPPSRCS = \

55
dom/sms/src/ipc/PSms.ipdl Normal file
Просмотреть файл

@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et ft=cpp : */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Code.
*
* The Initial Developer of the Original Code is
* The Mozilla Foundation
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Chris Jones <jones.chris.g@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
include protocol PContent;
namespace mozilla {
namespace dom {
namespace sms {
sync protocol PSms {
manager PContent;
parent:
__delete__();
};
} // namespace sms
} // namespace dom
} // namespace mozilla

Просмотреть файл

@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Mozilla Foundation
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mounir Lamouri <mounir.lamouri@mozilla.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef mozilla_dom_sms_SmsChild_h
#define mozilla_dom_sms_SmsChild_h
#include "mozilla/dom/sms/PSmsChild.h"
namespace mozilla {
namespace dom {
namespace sms {
class SmsChild : public PSmsChild
{
};
} // namespace sms
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_sms_SmsChild_h

Просмотреть файл

@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Mozilla Foundation
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mounir Lamouri <mounir.lamouri@mozilla.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef mozilla_dom_sms_SmsParent_h
#define mozilla_dom_sms_SmsParent_h
#include "mozilla/dom/sms/PSmsParent.h"
namespace mozilla {
namespace dom {
namespace sms {
class SmsParent : public PSmsParent
{
};
} // namespace sms
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_sms_SmsParent_h

39
dom/sms/src/ipc/ipdl.mk Normal file
Просмотреть файл

@ -0,0 +1,39 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Content App.
#
# The Initial Developer of the Original Code is
# The Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
IPDLSRCS = \
PSms.ipdl \
$(NULL)

Просмотреть файл

@ -57,6 +57,7 @@ IPDLDIRS = \
uriloader/exthandler \
dom/plugins/ipc \
dom/ipc \
dom/sms/src/ipc \
dom/src/storage \
gfx/layers/ipc \
hal/sandbox \