Bug 844431 - B2G MMS: provide nsIDOMMobileMessageManager interface (with sendMMS() first) (part 3-1, s/nsISmsRequest/nsIMobileMessageCallback). r=vicamo a=leo+
authorGene Lian <clian@mozilla.com>
Sat, 09 Mar 2013 15:22:02 +0800
changeset 135281 8b3e06cacd1d05c8ddfe82f0ccc6e2b390bae98b
parent 135280 71828abe98b5bb8a550cec719b57ca286a436b3a
child 135282 eae203b80dd0001fc5c9ff017621d6716727268b
push idunknown
push userunknown
push dateunknown
reviewersvicamo, leo
bugs844431
milestone22.0a1
Bug 844431 - B2G MMS: provide nsIDOMMobileMessageManager interface (with sendMMS() first) (part 3-1, s/nsISmsRequest/nsIMobileMessageCallback). r=vicamo a=leo+
dom/mobilemessage/interfaces/moz.build
dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
dom/mobilemessage/interfaces/nsIMobileMessageDatabaseService.idl
dom/mobilemessage/interfaces/nsISmsRequest.idl
dom/mobilemessage/interfaces/nsISmsService.idl
dom/mobilemessage/src/MobileMessageManager.cpp
dom/mobilemessage/src/SmsCursor.cpp
dom/mobilemessage/src/SmsCursor.h
dom/mobilemessage/src/SmsManager.cpp
dom/mobilemessage/src/SmsRequest.cpp
dom/mobilemessage/src/SmsRequest.h
dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp
dom/mobilemessage/src/android/SmsService.cpp
dom/mobilemessage/src/fallback/MobileMessageDatabaseService.cpp
dom/mobilemessage/src/fallback/SmsService.cpp
dom/mobilemessage/src/ipc/SmsChild.cpp
dom/mobilemessage/src/ipc/SmsChild.h
dom/mobilemessage/src/ipc/SmsIPCService.cpp
dom/mobilemessage/src/ipc/SmsParent.cpp
dom/mobilemessage/src/ril/MobileMessageDatabaseService.js
dom/mobilemessage/src/ril/SmsService.cpp
dom/system/gonk/RadioInterfaceLayer.js
dom/system/gonk/nsIRadioInterfaceLayer.idl
js/xpconnect/src/dictionary_helper_gen.conf
widget/android/AndroidBridge.cpp
widget/android/AndroidBridge.h
widget/android/AndroidJNI.cpp
--- a/dom/mobilemessage/interfaces/moz.build
+++ b/dom/mobilemessage/interfaces/moz.build
@@ -10,18 +10,18 @@ XPIDL_SOURCES += [
     'nsIDOMMozSmsMessage.idl',
     'nsIDOMNavigatorMobileMessage.idl',
     'nsIDOMNavigatorSms.idl',
     'nsIDOMSmsCursor.idl',
     'nsIDOMSmsFilter.idl',
     'nsIDOMSmsManager.idl',
     'nsIDOMSmsRequest.idl',
     'nsIDOMSmsSegmentInfo.idl',
+    'nsIMobileMessageCallback.idl',
     'nsIMobileMessageDatabaseService.idl',
-    'nsISmsRequest.idl',
     'nsISmsService.idl',
 ]
 
 if CONFIG['MOZ_B2G_RIL']:
     XPIDL_SOURCES += [
         'nsIRilMobileMessageDatabaseService.idl',
     ]
 
rename from dom/mobilemessage/interfaces/nsISmsRequest.idl
rename to dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
--- a/dom/mobilemessage/interfaces/nsISmsRequest.idl
+++ b/dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl
@@ -9,18 +9,18 @@ interface nsIDOMMozSmsMessage;
 dictionary SmsThreadListItem
 {
   DOMString senderOrReceiver;
   unsigned long long timestamp;
   DOMString body;
   unsigned long long unreadCount;
 };
 
-[scriptable, builtinclass, uuid(82a6d16d-cf33-4745-8662-8b5d441f512f)]
-interface nsISmsRequest : nsISupports
+[scriptable, builtinclass, uuid(9b4f6e3e-8577-11e2-83c1-e3a75aac027d)]
+interface nsIMobileMessageCallback : nsISupports
 {
   /**
    * All SMS related errors that could apply to SmsRequest objects.
    * Make sure to keep this list in sync with the list in:
    * embedding/android/GeckoSmsManager.java
    */
   const unsigned short SUCCESS_NO_ERROR = 0;
   const unsigned short NO_SIGNAL_ERROR  = 1;
--- a/dom/mobilemessage/interfaces/nsIMobileMessageDatabaseService.idl
+++ b/dom/mobilemessage/interfaces/nsIMobileMessageDatabaseService.idl
@@ -7,23 +7,35 @@
 %{C++
 #define MOBILE_MESSAGE_DATABASE_SERVICE_CID \
 { 0x0d84b9c2, 0x8f76, 0x4ba4,    \
 { 0xa5, 0xcd, 0xdb, 0xfb, 0x01, 0xdf, 0xda, 0x99 } }
 #define MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID "@mozilla.org/mobilemessage/mobilemessagedatabaseservice;1"
 %}
 
 interface nsIDOMMozSmsFilter;
-interface nsISmsRequest;
+interface nsIMobileMessageCallback;
 
-[scriptable, uuid(ce9232ca-6a08-11e2-b971-c795004622e7)]
+[scriptable, uuid(4000064a-86d2-11e2-b4a6-ef0f30bd1e59)]
 interface nsIMobileMessageDatabaseService : nsISupports
 {
   [binaryname(GetMessageMoz)]
-  void getMessage(in long messageId, in nsISmsRequest request);
-  void deleteMessage(in long messageId, in nsISmsRequest request);
-  void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in nsISmsRequest request);
-  void getNextMessageInList(in long listId, in nsISmsRequest request);
+  void getMessage(in long messageId,
+                  in nsIMobileMessageCallback request);
+
+  void deleteMessage(in long messageId,
+                     in nsIMobileMessageCallback request);
+
+  void createMessageList(in nsIDOMMozSmsFilter filter,
+                         in boolean reverse,
+                         in nsIMobileMessageCallback request);
+
+  void getNextMessageInList(in long listId,
+                            in nsIMobileMessageCallback request);
+
   void clearMessageList(in long listId);
-  void markMessageRead(in long messageId, in boolean value, in nsISmsRequest request);
 
-  void getThreadList(in nsISmsRequest request);
+  void markMessageRead(in long messageId,
+                       in boolean value,
+                       in nsIMobileMessageCallback request);
+
+  void getThreadList(in nsIMobileMessageCallback request);
 };
--- a/dom/mobilemessage/interfaces/nsISmsService.idl
+++ b/dom/mobilemessage/interfaces/nsISmsService.idl
@@ -1,33 +1,33 @@
 /* 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/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMMozSmsMessage;
 interface nsIDOMMozSmsSegmentInfo;
-interface nsISmsRequest;
+interface nsIMobileMessageCallback;
 
 %{C++
 #define SMS_SERVICE_CID { 0xbada3cb8, 0xa568, 0x4dff, { 0xb5, 0x43, 0x52, 0xbb, 0xb3, 0x14, 0x31, 0x21 } }
 #define SMS_SERVICE_CONTRACTID "@mozilla.org/sms/smsservice;1"
 %}
 
-[scriptable, builtinclass, uuid(4310bdb5-eefa-4f70-965a-74041228ab26)]
+[scriptable, builtinclass, uuid(5d066568-86d2-11e2-a0d0-7351fb5ae50a)]
 interface nsISmsService : nsISupports
 {
   boolean hasSupport();
 
   nsIDOMMozSmsSegmentInfo getSegmentInfoForText(in DOMString text);
 
   void send(in DOMString number,
             in DOMString message,
-            in nsISmsRequest request);
+            in nsIMobileMessageCallback request);
 
   [implicit_jscontext]
   nsIDOMMozSmsMessage createSmsMessage(in long      id,
                                        in DOMString delivery,
                                        in DOMString deliveryStatus,
                                        in DOMString sender,
                                        in DOMString receiver,
                                        in DOMString body,
--- a/dom/mobilemessage/src/MobileMessageManager.cpp
+++ b/dom/mobilemessage/src/MobileMessageManager.cpp
@@ -106,17 +106,17 @@ MobileMessageManager::Send(JSContext* aC
     NS_ERROR("No SMS Service!");
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIDOMMozSmsRequest> request = SmsRequest::Create(this);
   nsDependentJSString number;
   number.init(aCx, aNumber);
 
-  nsCOMPtr<nsISmsRequest> forwarder =
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
     new SmsRequestForwarder(static_cast<SmsRequest*>(request.get()));
 
   smsService->Send(number, aMessage, forwarder);
 
   nsresult rv = nsContentUtils::WrapNative(aCx, aGlobal, request, aRequest);
   if (NS_FAILED(rv)) {
     NS_ERROR("Failed to create the js value!");
     return rv;
@@ -175,31 +175,33 @@ MobileMessageManager::Send(const jsval& 
 
 NS_IMETHODIMP
 MobileMessageManager::GetMessageMoz(int32_t aId, nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
+    new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->GetMessageMoz(aId, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 nsresult
 MobileMessageManager::Delete(int32_t aId, nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
 
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
+    new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->DeleteMessage(aId, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageManager::Delete(const jsval& aParam, nsIDOMMozSmsRequest** aRequest)
 {
@@ -234,45 +236,46 @@ MobileMessageManager::GetMessages(nsIDOM
   if (!filter) {
     filter = new SmsFilter();
   }
 
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
+    new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->CreateMessageList(filter, aReverse, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageManager::MarkMessageRead(int32_t aId, bool aValue,
                                       nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder =
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
     new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->MarkMessageRead(aId, aValue, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageManager::GetThreadList(nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder =
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
     new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->GetThreadList(forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 nsresult
 MobileMessageManager::DispatchTrustedSmsEventToSelf(const nsAString& aEventName,
--- a/dom/mobilemessage/src/SmsCursor.cpp
+++ b/dom/mobilemessage/src/SmsCursor.cpp
@@ -26,17 +26,17 @@ NS_IMPL_CYCLE_COLLECTION_2(SmsCursor, mR
 NS_IMPL_CYCLE_COLLECTING_ADDREF(SmsCursor)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(SmsCursor)
 
 SmsCursor::SmsCursor()
   : mListId(-1)
 {
 }
 
-SmsCursor::SmsCursor(int32_t aListId, nsISmsRequest* aRequest)
+SmsCursor::SmsCursor(int32_t aListId, nsIMobileMessageCallback* aRequest)
   : mListId(aListId)
   , mRequest(aRequest)
 {
 }
 
 SmsCursor::~SmsCursor()
 {
   NS_ASSERTION(!mMessage, "mMessage shouldn't be set!");
@@ -81,17 +81,17 @@ SmsCursor::Continue()
 
   mMessage = nullptr;
   request->Reset();
 
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
 
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(request);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(request);
   mobileMessageDBService->GetNextMessageInList(mListId, forwarder);
 
   // We intenionally increase the refcount. The release will be called
   // in the corresponding callback.
   request.forget();
   return NS_OK;
 }
 
--- a/dom/mobilemessage/src/SmsCursor.h
+++ b/dom/mobilemessage/src/SmsCursor.h
@@ -7,42 +7,42 @@
 #define mozilla_dom_mobilemessage_SmsCursor_h
 
 #include "nsIDOMSmsCursor.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsCOMPtr.h"
 #include "mozilla/Attributes.h"
 
 class nsIDOMMozSmsMessage;
-class nsISmsRequest;
+class nsIMobileMessageCallback;
 
 namespace mozilla {
 namespace dom {
 
 class SmsCursor MOZ_FINAL : public nsIDOMMozSmsCursor
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIDOMMOZSMSCURSOR
 
   NS_DECL_CYCLE_COLLECTION_CLASS(SmsCursor)
 
   SmsCursor();
-  SmsCursor(int32_t aListId, nsISmsRequest* aRequest);
+  SmsCursor(int32_t aListId, nsIMobileMessageCallback* aRequest);
 
   ~SmsCursor();
 
   void SetMessage(nsIDOMMozSmsMessage* aMessage);
 
   void Disconnect();
 
 private:
-  int32_t                       mListId;
-  nsCOMPtr<nsISmsRequest>       mRequest;
-  nsCOMPtr<nsIDOMMozSmsMessage> mMessage;
+  int32_t                            mListId;
+  nsCOMPtr<nsIMobileMessageCallback> mRequest;
+  nsCOMPtr<nsIDOMMozSmsMessage>      mMessage;
 };
 
 inline void
 SmsCursor::SetMessage(nsIDOMMozSmsMessage* aMessage)
 {
   mMessage = aMessage;
 }
 
--- a/dom/mobilemessage/src/SmsManager.cpp
+++ b/dom/mobilemessage/src/SmsManager.cpp
@@ -147,17 +147,17 @@ SmsManager::Send(JSContext* aCx, JSObjec
     NS_ERROR("No SMS Service!");
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIDOMMozSmsRequest> request = SmsRequest::Create(this);
   nsDependentJSString number;
   number.init(aCx, aNumber);
 
-  nsCOMPtr<nsISmsRequest> forwarder =
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
     new SmsRequestForwarder(static_cast<SmsRequest*>(request.get()));
 
   smsService->Send(number, aMessage, forwarder);
 
   nsresult rv = nsContentUtils::WrapNative(aCx, aGlobal, request, aRequest);
   if (NS_FAILED(rv)) {
     NS_ERROR("Failed to create the js value!");
     return rv;
@@ -216,31 +216,33 @@ SmsManager::Send(const jsval& aNumber, c
 
 NS_IMETHODIMP
 SmsManager::GetMessageMoz(int32_t aId, nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
+    new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->GetMessageMoz(aId, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 nsresult
 SmsManager::Delete(int32_t aId, nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
 
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
+    new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->DeleteMessage(aId, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsManager::Delete(const jsval& aParam, nsIDOMMozSmsRequest** aRequest)
 {
@@ -275,45 +277,46 @@ SmsManager::GetMessages(nsIDOMMozSmsFilt
   if (!filter) {
     filter = new SmsFilter();
   }
 
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
+    new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->CreateMessageList(filter, aReverse, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsManager::MarkMessageRead(int32_t aId, bool aValue,
                             nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder =
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
     new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->MarkMessageRead(aId, aValue, forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsManager::GetThreadList(nsIDOMMozSmsRequest** aRequest)
 {
   nsCOMPtr<nsIDOMMozSmsRequest> req = SmsRequest::Create(this);
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, NS_ERROR_FAILURE);
-  nsCOMPtr<nsISmsRequest> forwarder =
+  nsCOMPtr<nsIMobileMessageCallback> forwarder =
     new SmsRequestForwarder(static_cast<SmsRequest*>(req.get()));
   mobileMessageDBService->GetThreadList(forwarder);
   req.forget(aRequest);
   return NS_OK;
 }
 
 nsresult
 SmsManager::DispatchTrustedSmsEventToSelf(const nsAString& aEventName, nsIDOMMozSmsMessage* aMessage)
--- a/dom/mobilemessage/src/SmsRequest.cpp
+++ b/dom/mobilemessage/src/SmsRequest.cpp
@@ -26,17 +26,17 @@
 
 using namespace mozilla::dom::mobilemessage;
 
 DOMCI_DATA(MozSmsRequest, mozilla::dom::SmsRequest)
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_ISUPPORTS1(SmsRequestForwarder, nsISmsRequest)
+NS_IMPL_ISUPPORTS1(SmsRequestForwarder, nsIMobileMessageCallback)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SmsRequest,
                                                   nsDOMEventTargetHelper)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCursor)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mError)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
@@ -52,17 +52,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(SmsRequest,
                                                nsDOMEventTargetHelper)
   NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mResult)
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SmsRequest)
   NS_INTERFACE_MAP_ENTRY(nsIDOMMozSmsRequest)
   NS_INTERFACE_MAP_ENTRY(nsIDOMDOMRequest)
-  NS_INTERFACE_MAP_ENTRY(nsISmsRequest)
+  NS_INTERFACE_MAP_ENTRY(nsIMobileMessageCallback)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozSmsRequest)
 NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(SmsRequest, nsDOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(SmsRequest, nsDOMEventTargetHelper)
 
 NS_IMPL_EVENT_HANDLER(SmsRequest, success)
 NS_IMPL_EVENT_HANDLER(SmsRequest, error)
@@ -200,64 +200,64 @@ SmsRequest::SetSuccessInternal(nsISuppor
 {
   NS_PRECONDITION(!mDone, "mDone shouldn't have been set to true already!");
   NS_PRECONDITION(!mError, "mError shouldn't have been set!");
   NS_PRECONDITION(mResult == JSVAL_VOID, "mResult shouldn't have been set!");
 
   nsresult rv;
   nsIScriptContext* sc = GetContextForEventHandlers(&rv);
   if (!sc) {
-    SetError(nsISmsRequest::INTERNAL_ERROR);
+    SetError(nsIMobileMessageCallback::INTERNAL_ERROR);
     return false;
   }
 
   AutoPushJSContext cx(sc->GetNativeContext());
   NS_ASSERTION(cx, "Failed to get a context!");
 
   JSObject* global = sc->GetNativeGlobal();
   NS_ASSERTION(global, "Failed to get global object!");
 
   JSAutoRequest ar(cx);
   JSAutoCompartment ac(cx, global);
 
   RootResult();
 
   if (NS_FAILED(nsContentUtils::WrapNative(cx, global, aObject, &mResult))) {
     UnrootResult();
-    SetError(nsISmsRequest::INTERNAL_ERROR);
+    SetError(nsIMobileMessageCallback::INTERNAL_ERROR);
     return false;
   }
 
   mDone = true;
   return true;
 }
 
 void
 SmsRequest::SetError(int32_t aError)
 {
   NS_PRECONDITION(!mDone, "mDone shouldn't have been set to true already!");
   NS_PRECONDITION(!mError, "mError shouldn't have been set!");
   NS_PRECONDITION(mResult == JSVAL_VOID, "mResult shouldn't have been set!");
-  NS_PRECONDITION(aError != nsISmsRequest::SUCCESS_NO_ERROR,
+  NS_PRECONDITION(aError != nsIMobileMessageCallback::SUCCESS_NO_ERROR,
                   "Can't call SetError() with SUCCESS_NO_ERROR!");
 
   mDone = true;
   mCursor = nullptr;
 
   switch (aError) {
-    case nsISmsRequest::NO_SIGNAL_ERROR:
+    case nsIMobileMessageCallback::NO_SIGNAL_ERROR:
       mError = DOMError::CreateWithName(NS_LITERAL_STRING("NoSignalError"));
       break;
-    case nsISmsRequest::NOT_FOUND_ERROR:
+    case nsIMobileMessageCallback::NOT_FOUND_ERROR:
       mError = DOMError::CreateWithName(NS_LITERAL_STRING("NotFoundError"));
       break;
-    case nsISmsRequest::UNKNOWN_ERROR:
+    case nsIMobileMessageCallback::UNKNOWN_ERROR:
       mError = DOMError::CreateWithName(NS_LITERAL_STRING("UnknownError"));
       break;
-    case nsISmsRequest::INTERNAL_ERROR:
+    case nsIMobileMessageCallback::INTERNAL_ERROR:
       mError = DOMError::CreateWithName(NS_LITERAL_STRING("InternalError"));
       break;
     default: // SUCCESS_NO_ERROR is handled above.
       MOZ_ASSERT(false, "Unknown error value.");
   }
 }
 
 NS_IMETHODIMP
--- a/dom/mobilemessage/src/SmsRequest.h
+++ b/dom/mobilemessage/src/SmsRequest.h
@@ -2,17 +2,17 @@
 /* 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_dom_mobilemessage_SmsRequest_h
 #define mozilla_dom_mobilemessage_SmsRequest_h
 
 #include "nsIDOMSmsRequest.h"
-#include "nsISmsRequest.h"
+#include "nsIMobileMessageCallback.h"
 #include "nsDOMEventTargetHelper.h"
 
 class nsIDOMMozSmsMessage;
 class nsIDOMMozSmsCursor;
 
 namespace mozilla {
 namespace dom {
 
@@ -20,52 +20,52 @@ namespace mobilemessage {
   class SmsRequestChild;
   class SmsRequestParent;
   class MessageReply;
   class ThreadListItem;
 }
 
 // We need this forwarder to avoid a QI to nsIClassInfo.
 // See: https://bugzilla.mozilla.org/show_bug.cgi?id=775997#c51 
-class SmsRequestForwarder : public nsISmsRequest
+class SmsRequestForwarder : public nsIMobileMessageCallback
 {
   friend class mobilemessage::SmsRequestChild;
 
 public:
   NS_DECL_ISUPPORTS
-  NS_FORWARD_NSISMSREQUEST(mRealRequest->)
+  NS_FORWARD_NSIMOBILEMESSAGECALLBACK(mRealRequest->)
 
-  SmsRequestForwarder(nsISmsRequest* aRealRequest) {
+  SmsRequestForwarder(nsIMobileMessageCallback* aRealRequest) {
     mRealRequest = aRealRequest;
   }
 
 private:
   virtual
   ~SmsRequestForwarder() {}
 
-  nsISmsRequest* GetRealRequest() {
+  nsIMobileMessageCallback* GetRealRequest() {
     return mRealRequest;
   }
 
-  nsCOMPtr<nsISmsRequest> mRealRequest;
+  nsCOMPtr<nsIMobileMessageCallback> mRealRequest;
 };
 
 class SmsManager;
 class MobileMessageManager;
 
 class SmsRequest : public nsDOMEventTargetHelper
                  , public nsIDOMMozSmsRequest
-                 , public nsISmsRequest
+                 , public nsIMobileMessageCallback
 {
 public:
   friend class SmsCursor;
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMDOMREQUEST
-  NS_DECL_NSISMSREQUEST
+  NS_DECL_NSIMOBILEMESSAGECALLBACK
   NS_DECL_NSIDOMMOZSMSREQUEST
 
   NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper::)
 
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(SmsRequest,
                                                          nsDOMEventTargetHelper)
 
   static already_AddRefed<nsIDOMMozSmsRequest> Create(SmsManager* aManager);
--- a/dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp
+++ b/dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp
@@ -9,52 +9,56 @@
 
 namespace mozilla {
 namespace dom {
 namespace mobilemessage {
 
 NS_IMPL_ISUPPORTS1(MobileMessageDatabaseService, nsIMobileMessageDatabaseService)
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::GetMessageMoz(int32_t aMessageId, nsISmsRequest* aRequest)
+MobileMessageDatabaseService::GetMessageMoz(int32_t aMessageId,
+                                            nsIMobileMessageCallback* aRequest)
 {
   if (!AndroidBridge::Bridge()) {
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->GetMessage(aMessageId, aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::DeleteMessage(int32_t aMessageId, nsISmsRequest* aRequest)
+MobileMessageDatabaseService::DeleteMessage(int32_t aMessageId,
+                                            nsIMobileMessageCallback* aRequest)
 {
   if (!AndroidBridge::Bridge()) {
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->DeleteMessage(aMessageId, aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::CreateMessageList(nsIDOMMozSmsFilter* aFilter,
-                                                bool aReverse, nsISmsRequest* aRequest)
+                                                bool aReverse,
+                                                nsIMobileMessageCallback* aRequest)
 {
   if (!AndroidBridge::Bridge()) {
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->CreateMessageList(
     static_cast<SmsFilter*>(aFilter)->GetData(), aReverse, aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::GetNextMessageInList(int32_t aListId, nsISmsRequest* aRequest)
+MobileMessageDatabaseService::GetNextMessageInList(int32_t aListId,
+                                                   nsIMobileMessageCallback* aRequest)
 {
   if (!AndroidBridge::Bridge()) {
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->GetNextMessageInList(aListId, aRequest);
   return NS_OK;
 }
@@ -66,25 +70,26 @@ MobileMessageDatabaseService::ClearMessa
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->ClearMessageList(aListId);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::MarkMessageRead(int32_t aMessageId, bool aValue,
-                                              nsISmsRequest* aRequest)
+MobileMessageDatabaseService::MarkMessageRead(int32_t aMessageId,
+                                              bool aValue,
+                                              nsIMobileMessageCallback* aRequest)
 {
   // TODO: This would need to be implemented as part of Bug 748391
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::GetThreadList(nsISmsRequest* aRequest)
+MobileMessageDatabaseService::GetThreadList(nsIMobileMessageCallback* aRequest)
 {
   NS_NOTYETIMPLEMENTED("Implement me!");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 } // namespace mobilemessage
 } // namespace dom
 } // namespace mozilla
--- a/dom/mobilemessage/src/android/SmsService.cpp
+++ b/dom/mobilemessage/src/android/SmsService.cpp
@@ -36,17 +36,17 @@ SmsService::GetSegmentInfoForText(const 
 
   nsCOMPtr<nsIDOMMozSmsSegmentInfo> info = new SmsSegmentInfo(data);
   info.forget(aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsService::Send(const nsAString& aNumber, const nsAString& aMessage,
-                 nsISmsRequest* aRequest)
+                 nsIMobileMessageCallback* aRequest)
 {
   if (!AndroidBridge::Bridge()) {
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->SendMessage(aNumber, aMessage, aRequest);
   return NS_OK;
 }
--- a/dom/mobilemessage/src/fallback/MobileMessageDatabaseService.cpp
+++ b/dom/mobilemessage/src/fallback/MobileMessageDatabaseService.cpp
@@ -8,65 +8,65 @@
 namespace mozilla {
 namespace dom {
 namespace mobilemessage {
 
 NS_IMPL_ISUPPORTS1(MobileMessageDatabaseService, nsIMobileMessageDatabaseService)
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::GetMessageMoz(int32_t aMessageId,
-                                            nsISmsRequest* aRequest)
+                                            nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::DeleteMessage(int32_t aMessageId,
-                                            nsISmsRequest* aRequest)
+                                            nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::CreateMessageList(nsIDOMMozSmsFilter* aFilter,
                                                 bool aReverse,
-                                                nsISmsRequest* aRequest)
+                                                nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::GetNextMessageInList(int32_t aListId,
-                                                   nsISmsRequest* aRequest)
+                                                   nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::ClearMessageList(int32_t aListId)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::MarkMessageRead(int32_t aMessageId,
                                               bool aValue,
-                                              nsISmsRequest* aRequest)
+                                              nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::GetThreadList(nsISmsRequest* aRequest)
+MobileMessageDatabaseService::GetThreadList(nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 } // namespace mobilemessage
 } // namespace dom
 } // namespace mozilla
--- a/dom/mobilemessage/src/fallback/SmsService.cpp
+++ b/dom/mobilemessage/src/fallback/SmsService.cpp
@@ -27,17 +27,17 @@ SmsService::GetSegmentInfoForText(const 
 {
   NS_ERROR("We should not be here!");
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 SmsService::Send(const nsAString& aNumber,
                  const nsAString& aMessage,
-                 nsISmsRequest* aRequest)
+                 nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsService::CreateSmsMessage(int32_t aId,
                              const nsAString& aDelivery,
--- a/dom/mobilemessage/src/ipc/SmsChild.cpp
+++ b/dom/mobilemessage/src/ipc/SmsChild.cpp
@@ -105,17 +105,17 @@ SmsChild::DeallocPSmsRequest(PSmsRequest
   delete aActor;
   return true;
 }
 
 /*******************************************************************************
  * SmsRequestChild
  ******************************************************************************/
 
-SmsRequestChild::SmsRequestChild(nsISmsRequest* aReplyRequest)
+SmsRequestChild::SmsRequestChild(nsIMobileMessageCallback* aReplyRequest)
 : mReplyRequest(aReplyRequest)
 {
   MOZ_COUNT_CTOR(SmsRequestChild);
   MOZ_ASSERT(aReplyRequest);
 }
 
 SmsRequestChild::~SmsRequestChild()
 {
--- a/dom/mobilemessage/src/ipc/SmsChild.h
+++ b/dom/mobilemessage/src/ipc/SmsChild.h
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_mobilemessage_SmsChild_h
 #define mozilla_dom_mobilemessage_SmsChild_h
 
 #include "mozilla/dom/mobilemessage/PSmsChild.h"
 #include "mozilla/dom/mobilemessage/PSmsRequestChild.h"
 
-class nsISmsRequest;
+class nsIMobileMessageCallback;
 
 namespace mozilla {
 namespace dom {
 namespace mobilemessage {
 
 class SmsChild : public PSmsChild
 {
 public:
@@ -50,20 +50,20 @@ protected:
   virtual bool
   DeallocPSmsRequest(PSmsRequestChild* aActor) MOZ_OVERRIDE;
 };
 
 class SmsRequestChild : public PSmsRequestChild
 {
   friend class SmsChild;
 
-  nsCOMPtr<nsISmsRequest> mReplyRequest;
+  nsCOMPtr<nsIMobileMessageCallback> mReplyRequest;
 
 public:
-  SmsRequestChild(nsISmsRequest* aReplyRequest);
+  SmsRequestChild(nsIMobileMessageCallback* aReplyRequest);
 
 protected:
   virtual ~SmsRequestChild();
 
   virtual void
   ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   virtual bool
--- a/dom/mobilemessage/src/ipc/SmsIPCService.cpp
+++ b/dom/mobilemessage/src/ipc/SmsIPCService.cpp
@@ -17,17 +17,17 @@ namespace mozilla {
 namespace dom {
 namespace mobilemessage {
 
 PSmsChild* gSmsChild;
 
 NS_IMPL_ISUPPORTS2(SmsIPCService, nsISmsService, nsIMobileMessageDatabaseService)
 
 void
-SendRequest(const IPCSmsRequest& aRequest, nsISmsRequest* aRequestReply)
+SendRequest(const IPCSmsRequest& aRequest, nsIMobileMessageCallback* aRequestReply)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   NS_WARN_IF_FALSE(gSmsChild,
                    "Calling methods on SmsIPCService during "
                    "shutdown!");
 
   if (gSmsChild) {
@@ -68,17 +68,17 @@ SmsIPCService::GetSegmentInfoForText(con
   nsCOMPtr<nsIDOMMozSmsSegmentInfo> info = new SmsSegmentInfo(data);
   info.forget(aResult);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::Send(const nsAString& aNumber,
                     const nsAString& aMessage,
-                    nsISmsRequest* aRequest)
+                    nsIMobileMessageCallback* aRequest)
 {
   SendRequest(SendMessageRequest(nsString(aNumber), nsString(aMessage)), aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::CreateSmsMessage(int32_t aId,
                                 const nsAString& aDelivery,
@@ -110,66 +110,66 @@ SmsIPCService::CreateSmsSegmentInfo(int3
   return NS_OK;
 }
 
 /*
  * Implementation of nsIMobileMessageDatabaseService.
  */
 NS_IMETHODIMP
 SmsIPCService::GetMessageMoz(int32_t aMessageId,
-                             nsISmsRequest* aRequest)
+                             nsIMobileMessageCallback* aRequest)
 {
   SendRequest(GetMessageRequest(aMessageId), aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::DeleteMessage(int32_t aMessageId,
-                             nsISmsRequest* aRequest)
+                             nsIMobileMessageCallback* aRequest)
 {
   SendRequest(DeleteMessageRequest(aMessageId), aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::CreateMessageList(nsIDOMMozSmsFilter* aFilter,
                                  bool aReverse,
-                                 nsISmsRequest* aRequest)
+                                 nsIMobileMessageCallback* aRequest)
 {
   SmsFilterData data = SmsFilterData(static_cast<SmsFilter*>(aFilter)->GetData());
   SendRequest(CreateMessageListRequest(data, aReverse), aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::GetNextMessageInList(int32_t aListId,
-                                    nsISmsRequest* aRequest)
+                                    nsIMobileMessageCallback* aRequest)
 {
   SendRequest(GetNextMessageInListRequest(aListId), aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::ClearMessageList(int32_t aListId)
 {
   GetSmsChild()->SendClearMessageList(aListId);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsIPCService::MarkMessageRead(int32_t aMessageId,
                                bool aValue,
-                               nsISmsRequest* aRequest)
+                               nsIMobileMessageCallback* aRequest)
 {
   SendRequest(MarkMessageReadRequest(aMessageId, aValue), aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-SmsIPCService::GetThreadList(nsISmsRequest* aRequest)
+SmsIPCService::GetThreadList(nsIMobileMessageCallback* aRequest)
 {
   SendRequest(GetThreadListRequest(), aRequest);
   return NS_OK;
 }
 
 } // namespace mobilemessage
 } // namespace dom
 } // namespace mozilla
--- a/dom/mobilemessage/src/ipc/SmsParent.cpp
+++ b/dom/mobilemessage/src/ipc/SmsParent.cpp
@@ -261,108 +261,108 @@ SmsRequestParent::SendReply(const Messag
 
 bool
 SmsRequestParent::DoRequest(const SendMessageRequest& aRequest)
 {
   nsCOMPtr<nsISmsService> smsService = do_GetService(SMS_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(smsService, true);
 
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   nsresult rv = smsService->Send(aRequest.number(), aRequest.message(), forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const GetMessageRequest& aRequest)
 {
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, true);
 
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   nsresult rv = mobileMessageDBService->GetMessageMoz(aRequest.messageId(), forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const DeleteMessageRequest& aRequest)
 {
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(mobileMessageDBService, true);
 
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   nsresult rv = mobileMessageDBService->DeleteMessage(aRequest.messageId(), forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const CreateMessageListRequest& aRequest)
 {
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
 
   NS_ENSURE_TRUE(mobileMessageDBService, true);
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   SmsFilter *filter = new SmsFilter(aRequest.filter());
   nsresult rv = mobileMessageDBService->CreateMessageList(filter, aRequest.reverse(), forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const GetNextMessageInListRequest& aRequest)
 {
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
 
   NS_ENSURE_TRUE(mobileMessageDBService, true);
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   nsresult rv = mobileMessageDBService->GetNextMessageInList(aRequest.aListId(), forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const MarkMessageReadRequest& aRequest)
 {
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
 
   NS_ENSURE_TRUE(mobileMessageDBService, true);
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   nsresult rv = mobileMessageDBService->MarkMessageRead(aRequest.messageId(), aRequest.value(), forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const GetThreadListRequest& aRequest)
 {
   nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService =
     do_GetService(MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
 
   NS_ENSURE_TRUE(mobileMessageDBService, true);
   mSmsRequest = SmsRequest::Create(this);
-  nsCOMPtr<nsISmsRequest> forwarder = new SmsRequestForwarder(mSmsRequest);
+  nsCOMPtr<nsIMobileMessageCallback> forwarder = new SmsRequestForwarder(mSmsRequest);
   nsresult rv = mobileMessageDBService->GetThreadList(forwarder);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
 
 } // namespace mobilemessage
 } // namespace dom
--- a/dom/mobilemessage/src/ril/MobileMessageDatabaseService.js
+++ b/dom/mobilemessage/src/ril/MobileMessageDatabaseService.js
@@ -614,17 +614,17 @@ MobileMessageDatabaseService.prototype =
       // No fetched results yet and still processing. Let's wait a bit more.
       return;
     }
 
     if (aMessageList.results[0] < 0) {
       // An previous error found. Keep the answer in results so that we can
       // reply INTERNAL_ERROR for further requests.
       if (DEBUG) debug("An previous error found");
-      smsRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+      smsRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       return;
     }
 
     let firstMessageId = aMessageList.results.shift();
     if (DEBUG) debug ("Fetching message " + firstMessageId);
 
     let getRequest = aMessageStore.get(firstMessageId);
     let self = this;
@@ -647,17 +647,17 @@ MobileMessageDatabaseService.prototype =
         smsRequest.notifyMessageListCreated(aMessageList.listId, sms);
       }
     };
     getRequest.onerror = function onerror(event) {
       if (DEBUG) {
         debug("notifyReadMessageListFailed - listId: "
               + aMessageList.listId + ", messageId: " + firstMessageId);
       }
-      smsRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+      smsRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
     };
   },
 
   /**
    * Queue up {aMessageId, aTimestamp} pairs, find out intersections and report
    * to onNextMessageInListGot. Return true if it is still possible to have
    * another match.
    */
@@ -1214,69 +1214,69 @@ MobileMessageDatabaseService.prototype =
    */
 
   getMessage: function getMessage(messageId, aRequest) {
     if (DEBUG) debug("Retrieving message with ID " + messageId);
     let self = this;
     this.newTxn(READ_ONLY, function (error, txn, messageStore) {
       if (error) {
         if (DEBUG) debug(error);
-        aRequest.notifyGetMessageFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
         return;
       }
       let request = messageStore.mozGetAll(messageId);
 
       txn.oncomplete = function oncomplete() {
         if (DEBUG) debug("Transaction " + txn + " completed.");
         if (request.result.length > 1) {
           if (DEBUG) debug("Got too many results for id " + messageId);
-          aRequest.notifyGetMessageFailed(Ci.nsISmsRequest.UNKNOWN_ERROR);
+          aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.UNKNOWN_ERROR);
           return;
         }
         let messageRecord = request.result[0];
         if (!messageRecord) {
           if (DEBUG) debug("Message ID " + messageId + " not found");
-          aRequest.notifyGetMessageFailed(Ci.nsISmsRequest.NOT_FOUND_ERROR);
+          aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.NOT_FOUND_ERROR);
           return;
         }
         if (messageRecord.id != messageId) {
           if (DEBUG) {
             debug("Requested message ID (" + messageId + ") is " +
                   "different from the one we got");
           }
-          aRequest.notifyGetMessageFailed(Ci.nsISmsRequest.UNKNOWN_ERROR);
+          aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.UNKNOWN_ERROR);
           return;
         }
         let sms = self.createSmsMessageFromRecord(messageRecord);
         aRequest.notifyMessageGot(sms);
       };
 
       txn.onerror = function onerror(event) {
         if (DEBUG) {
           if (event.target)
             debug("Caught error on transaction", event.target.errorCode);
         }
         //TODO look at event.target.errorCode, pick appropriate error constant
-        aRequest.notifyGetMessageFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyGetMessageFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       };
     });
   },
 
   deleteMessage: function deleteMessage(messageId, aRequest) {
     let deleted = false;
     let self = this;
     this.newTxn(READ_WRITE, function (error, txn, stores) {
       if (error) {
-        aRequest.notifyDeleteMessageFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyDeleteMessageFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
         return;
       }
       txn.onerror = function onerror(event) {
         if (DEBUG) debug("Caught error on transaction", event.target.errorCode);
         //TODO look at event.target.errorCode, pick appropriate error constant
-        aRequest.notifyDeleteMessageFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyDeleteMessageFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       };
 
       const messageStore = stores[0];
       const threadStore = stores[1];
 
       let deleted = false;
 
       txn.oncomplete = function oncomplete(event) {
@@ -1358,17 +1358,17 @@ MobileMessageDatabaseService.prototype =
             " reverse: " + reverse);
     }
 
     let self = this;
     this.newTxn(READ_ONLY, function (error, txn, stores) {
       if (error) {
         //TODO look at event.target.errorCode, pick appropriate error constant.
         if (DEBUG) debug("IDBRequest error " + error.target.errorCode);
-        aRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
         return;
       }
 
       let messageStore = stores[0];
       let participantStore = stores[1];
 
       let messageList = {
         listId: -1,
@@ -1647,17 +1647,17 @@ MobileMessageDatabaseService.prototype =
   },
 
   getNextMessageInList: function getNextMessageInList(listId, aRequest) {
     if (DEBUG) debug("Getting next message in list " + listId);
     let messageId;
     let list = this.messageLists[listId];
     if (!list) {
       if (DEBUG) debug("Wrong list id");
-      aRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.NOT_FOUND_ERROR);
+      aRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.NOT_FOUND_ERROR);
       return;
     }
     if (list.processing) {
       // Database transaction ongoing, let it reply for us so that we won't get
       // blocked by the existing transaction.
       if (list.requestWaiting) {
         if (DEBUG) debug("Already waiting for another request!");
         return;
@@ -1666,46 +1666,46 @@ MobileMessageDatabaseService.prototype =
       return;
     }
     if (!list.results.length) {
       if (DEBUG) debug("Reached the end of the list!");
       aRequest.notifyNoMessageInList();
       return;
     }
     if (list.results[0] < 0) {
-      aRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+      aRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       return;
     }
     messageId = list.results.shift();
     let self = this;
     this.newTxn(READ_ONLY, function (error, txn, messageStore) {
       if (DEBUG) debug("Fetching message " + messageId);
       let request = messageStore.get(messageId);
       let messageRecord;
       request.onsuccess = function onsuccess(event) {
         messageRecord = request.result;
       };
 
       txn.oncomplete = function oncomplete(event) {
         if (DEBUG) debug("Transaction " + txn + " completed.");
         if (!messageRecord) {
           if (DEBUG) debug("Could not get message id " + messageId);
-          aRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.NOT_FOUND_ERROR);
+          aRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.NOT_FOUND_ERROR);
         }
         let sms = self.createSmsMessageFromRecord(messageRecord);
         aRequest.notifyNextMessageInListGot(sms);
       };
 
       txn.onerror = function onerror(event) {
         //TODO check event.target.errorCode
         if (DEBUG) {
           debug("Error retrieving message id: " + messageId +
                 ". Error code: " + event.target.errorCode);
         }
-        aRequest.notifyReadMessageListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyReadMessageListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       };
     });
   },
 
   clearMessageList: function clearMessageList(listId) {
     if (DEBUG) debug("Clearing message list: " + listId);
     if (this.messageLists[listId]) {
       this.messageLists[listId].stop = true;
@@ -1713,38 +1713,38 @@ MobileMessageDatabaseService.prototype =
     }
   },
 
   markMessageRead: function markMessageRead(messageId, value, aRequest) {
     if (DEBUG) debug("Setting message " + messageId + " read to " + value);
     this.newTxn(READ_WRITE, function (error, txn, stores) {
       if (error) {
         if (DEBUG) debug(error);
-        aRequest.notifyMarkMessageReadFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyMarkMessageReadFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
         return;
       }
       txn.onerror = function onerror(event) {
         if (DEBUG) debug("Caught error on transaction ", event.target.errorCode);
-        aRequest.notifyMarkMessageReadFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyMarkMessageReadFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       };
       let messageStore = stores[0];
       let threadStore = stores[1];
       messageStore.get(messageId).onsuccess = function onsuccess(event) {
         let messageRecord = event.target.result;
         if (!messageRecord) {
           if (DEBUG) debug("Message ID " + messageId + " not found");
-          aRequest.notifyMarkMessageReadFailed(Ci.nsISmsRequest.NOT_FOUND_ERROR);
+          aRequest.notifyMarkMessageReadFailed(Ci.nsIMobileMessageCallback.NOT_FOUND_ERROR);
           return;
         }
         if (messageRecord.id != messageId) {
           if (DEBUG) {
             debug("Retrieve message ID (" + messageId + ") is " +
                   "different from the one we got");
           }
-          aRequest.notifyMarkMessageReadFailed(Ci.nsISmsRequest.UNKNOWN_ERROR);
+          aRequest.notifyMarkMessageReadFailed(Ci.nsIMobileMessageCallback.UNKNOWN_ERROR);
           return;
         }
         // If the value to be set is the same as the current message `read`
         // value, we just notify successfully.
         if (messageRecord.read == value) {
           if (DEBUG) debug("The value of messageRecord.read is already " + value);
           aRequest.notifyMessageMarkedRead(messageRecord.read);
           return;
@@ -1780,22 +1780,22 @@ MobileMessageDatabaseService.prototype =
     }, [MESSAGE_STORE_NAME, THREAD_STORE_NAME]);
   },
 
   getThreadList: function getThreadList(aRequest) {
     if (DEBUG) debug("Getting thread list");
     this.newTxn(READ_ONLY, function (error, txn, threadStore) {
       if (error) {
         if (DEBUG) debug(error);
-        aRequest.notifyThreadListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyThreadListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
         return;
       }
       txn.onerror = function onerror(event) {
         if (DEBUG) debug("Caught error on transaction ", event.target.errorCode);
-        aRequest.notifyThreadListFailed(Ci.nsISmsRequest.INTERNAL_ERROR);
+        aRequest.notifyThreadListFailed(Ci.nsIMobileMessageCallback.INTERNAL_ERROR);
       };
       let request = threadStore.index("lastTimestamp").mozGetAll();
       request.onsuccess = function(event) {
         // TODO: keep backward compatibility of original API interface only.
         let results = [];
         for each (let item in event.target.result) {
           results.push({
             senderOrReceiver: item.participantAddresses[0],
--- a/dom/mobilemessage/src/ril/SmsService.cpp
+++ b/dom/mobilemessage/src/ril/SmsService.cpp
@@ -34,17 +34,17 @@ SmsService::GetSegmentInfoForText(const 
   NS_ENSURE_TRUE(mRIL, NS_ERROR_FAILURE);
 
   return mRIL->GetSegmentInfoForText(aText, aResult);
 }
 
 NS_IMETHODIMP
 SmsService::Send(const nsAString& aNumber,
                  const nsAString& aMessage,
-                 nsISmsRequest* aRequest)
+                 nsIMobileMessageCallback* aRequest)
 {
   if (!mRIL) {
     return NS_OK;
   }
   mRIL->SendSMS(aNumber, aMessage, aRequest);
   return NS_OK;
 }
 
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -1668,20 +1668,20 @@ RadioInterfaceLayer.prototype = {
     debug("handleSmsSendFailed: " + JSON.stringify(message));
 
     let options = this._sentSmsEnvelopes[message.envelopeId];
     if (!options) {
       return;
     }
     delete this._sentSmsEnvelopes[message.envelopeId];
 
-    let error = Ci.nsISmsRequest.UNKNOWN_ERROR;
+    let error = Ci.nsIMobileMessageCallback.UNKNOWN_ERROR;
     switch (message.errorMsg) {
       case RIL.ERROR_RADIO_NOT_AVAILABLE:
-        error = Ci.nsISmsRequest.NO_SIGNAL_ERROR;
+        error = Ci.nsIMobileMessageCallback.NO_SIGNAL_ERROR;
         break;
     }
 
     gMobileMessageDatabaseService.setMessageDelivery(options.sms.id,
                                                      DOM_MOBILE_MESSAGE_DELIVERY_ERROR,
                                                      RIL.GECKO_SMS_DELIVERY_STATUS_ERROR,
                                                      function notifyResult(rv, record) {
       let sms = this.createSmsMessageFromRecord(record);
--- a/dom/system/gonk/nsIRadioInterfaceLayer.idl
+++ b/dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ -1,17 +1,17 @@
 /* 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/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMMozMobileConnectionInfo;
 interface nsIDOMMozMobileICCInfo;
-interface nsISmsRequest;
+interface nsIMobileMessageCallback;
 interface nsIDOMMozSmsSegmentInfo;
 
 [scriptable, uuid(1e602d20-d066-4399-8997-daf36b3158ef)]
 interface nsIRILDataCallInfo : nsISupports
 {
   /**
    * Current data call state, one of the
    * nsINetworkInterface::NETWORK_STATE_* constants.
@@ -103,17 +103,17 @@ interface nsIRilContext : nsISupports
 
   readonly attribute nsIDOMMozMobileICCInfo iccInfo;
 
   readonly attribute nsIDOMMozMobileConnectionInfo voice;
 
   readonly attribute nsIDOMMozMobileConnectionInfo data;
 };
 
-[scriptable, uuid(e5f8cfa9-fd23-4c8d-b06b-635fdbae8b90)]
+[scriptable, uuid(8b3a1bc8-86d2-11e2-ace0-33f0ed290b90)]
 interface nsIRadioInterfaceLayer : nsISupports
 {
   /**
    * Activates or deactivates radio power.
    */
   void setRadioEnabled(in bool value);
 
   readonly attribute nsIRilContext rilContext;
@@ -143,17 +143,17 @@ interface nsIRadioInterfaceLayer : nsISu
 
   /**
    * SMS-related functionality.
    */
   nsIDOMMozSmsSegmentInfo getSegmentInfoForText(in DOMString text);
 
   void sendSMS(in DOMString number,
                in DOMString message,
-               in nsISmsRequest request);
+               in nsIMobileMessageCallback request);
 
   /**
    * ICC-related functionality.
    */
 
   /**
    * Get ICC Contact List.
    *
--- a/js/xpconnect/src/dictionary_helper_gen.conf
+++ b/js/xpconnect/src/dictionary_helper_gen.conf
@@ -15,17 +15,17 @@ dictionaries = [
      [ 'DOMFileMetadataParameters', 'nsIDOMLockedFile.idl' ],
      [ 'DeviceStorageEnumerationParameters', 'nsIDOMDeviceStorage.idl' ],
      [ 'CameraSize', 'nsIDOMCameraManager.idl' ],
      [ 'CameraRegion', 'nsIDOMCameraManager.idl' ],
      [ 'CameraPosition', 'nsIDOMCameraManager.idl' ],
      [ 'CameraSelector', 'nsIDOMCameraManager.idl' ],
      [ 'CameraPictureOptions', 'nsIDOMCameraManager.idl' ],
      [ 'CameraRecordingOptions', 'nsIDOMCameraManager.idl' ],
-     [ 'SmsThreadListItem', 'nsISmsRequest.idl' ],
+     [ 'SmsThreadListItem', 'nsIMobileMessageCallback.idl' ],
      [ 'MmsAttachment', 'nsIDOMMozMmsMessage.idl' ]
    ]
 
 # include file names
 special_includes = [
     'nsContentUtils.h',
     'XPCQuickStubs.h',
     'nsIDOMApplicationRegistry.h',
--- a/widget/android/AndroidBridge.cpp
+++ b/widget/android/AndroidBridge.cpp
@@ -55,17 +55,17 @@ static void JavaThreadDetachFunc(void *a
 class AndroidRefable {
     void incStrong(void* thing) { }
     void decStrong(void* thing) { }
 };
 
 // This isn't in AndroidBridge.h because including StrongPointer.h there is gross
 static android::sp<AndroidRefable> (*android_SurfaceTexture_getNativeWindow)(JNIEnv* env, jobject surfaceTexture) = nullptr;
 
-/* static */ StaticAutoPtr<nsTArray<nsCOMPtr<nsISmsRequest> > > AndroidBridge::sSmsRequests;
+/* static */ StaticAutoPtr<nsTArray<nsCOMPtr<nsIMobileMessageCallback> > > AndroidBridge::sSmsRequests;
 
 void
 AndroidBridge::ConstructBridge(JNIEnv *jEnv,
                                jclass jGeckoAppShellClass)
 {
     /* NSS hack -- bionic doesn't handle recursive unloads correctly,
      * because library finalizer functions are called with the dynamic
      * linker lock still held.  This results in a deadlock when trying
@@ -1665,17 +1665,19 @@ AndroidBridge::GetSegmentInfoForText(con
     // segmentChars = (codeUnitCount + codeUnitsRemaining) / msgCount
     aData->charsAvailableInLastSegment() = (info[1] + info[2]) / info[0];
 
     env->ReleaseIntArrayElements(arr, info, JNI_ABORT);
     return NS_OK;
 }
 
 void
-AndroidBridge::SendMessage(const nsAString& aNumber, const nsAString& aMessage, nsISmsRequest* aRequest)
+AndroidBridge::SendMessage(const nsAString& aNumber,
+                           const nsAString& aMessage,
+                           nsIMobileMessageCallback* aRequest)
 {
     ALOG_BRIDGE("AndroidBridge::SendMessage");
 
     JNIEnv *env = GetJNIEnv();
     if (!env)
         return;
 
     uint32_t requestId;
@@ -1685,34 +1687,34 @@ AndroidBridge::SendMessage(const nsAStri
     AutoLocalJNIFrame jniFrame(env);
     jstring jNumber = NewJavaString(&jniFrame, aNumber);
     jstring jMessage = NewJavaString(&jniFrame, aMessage);
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jSendMessage, jNumber, jMessage, requestId);
 }
 
 void
-AndroidBridge::GetMessage(int32_t aMessageId, nsISmsRequest* aRequest)
+AndroidBridge::GetMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequest)
 {
     ALOG_BRIDGE("AndroidBridge::GetMessage");
 
     JNIEnv *env = GetJNIEnv();
     if (!env)
         return;
 
     uint32_t requestId;
     if (!QueueSmsRequest(aRequest, &requestId))
         return;
 
     AutoLocalJNIFrame jniFrame(env, 0);
     env->CallStaticVoidMethod(mGeckoAppShellClass, jGetMessage, aMessageId, requestId);
 }
 
 void
-AndroidBridge::DeleteMessage(int32_t aMessageId, nsISmsRequest* aRequest)
+AndroidBridge::DeleteMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequest)
 {
     ALOG_BRIDGE("AndroidBridge::DeleteMessage");
 
     JNIEnv *env = GetJNIEnv();
     if (!env)
         return;
 
     uint32_t requestId;
@@ -1720,17 +1722,17 @@ AndroidBridge::DeleteMessage(int32_t aMe
         return;
 
     AutoLocalJNIFrame jniFrame(env, 0);
     env->CallStaticVoidMethod(mGeckoAppShellClass, jDeleteMessage, aMessageId, requestId);
 }
 
 void
 AndroidBridge::CreateMessageList(const dom::mobilemessage::SmsFilterData& aFilter, bool aReverse,
-                                 nsISmsRequest* aRequest)
+                                 nsIMobileMessageCallback* aRequest)
 {
     ALOG_BRIDGE("AndroidBridge::CreateMessageList");
 
     JNIEnv *env = GetJNIEnv();
     if (!env)
         return;
 
     uint32_t requestId;
@@ -1751,17 +1753,17 @@ AndroidBridge::CreateMessageList(const d
 
     env->CallStaticVoidMethod(mGeckoAppShellClass, jCreateMessageList,
                               aFilter.startDate(), aFilter.endDate(),
                               numbers, aFilter.numbers().Length(),
                               aFilter.delivery(), aReverse, requestId);
 }
 
 void
-AndroidBridge::GetNextMessageInList(int32_t aListId, nsISmsRequest* aRequest)
+AndroidBridge::GetNextMessageInList(int32_t aListId, nsIMobileMessageCallback* aRequest)
 {
     ALOG_BRIDGE("AndroidBridge::GetNextMessageInList");
 
     JNIEnv *env = GetJNIEnv();
     if (!env)
         return;
 
     uint32_t requestId;
@@ -1781,17 +1783,17 @@ AndroidBridge::ClearMessageList(int32_t 
     if (!env)
         return;
 
     AutoLocalJNIFrame jniFrame(env, 0);
     env->CallStaticVoidMethod(mGeckoAppShellClass, jClearMessageList, aListId);
 }
 
 bool
-AndroidBridge::QueueSmsRequest(nsISmsRequest* aRequest, uint32_t* aRequestIdOut)
+AndroidBridge::QueueSmsRequest(nsIMobileMessageCallback* aRequest, uint32_t* aRequestIdOut)
 {
     MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
     MOZ_ASSERT(aRequest && aRequestIdOut);
 
     if (!sSmsRequests) {
         // Probably shutting down.
         return false;
     }
@@ -1807,17 +1809,17 @@ AndroidBridge::QueueSmsRequest(nsISmsReq
 
     sSmsRequests->AppendElement(aRequest);
 
     // After AppendElement(), previous `length` points to the new tail element.
     *aRequestIdOut = length;
     return true;
 }
 
-already_AddRefed<nsISmsRequest>
+already_AddRefed<nsIMobileMessageCallback>
 AndroidBridge::DequeueSmsRequest(uint32_t aRequestId)
 {
     MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
 
     if (!sSmsRequests) {
         // Probably shutting down.
         return nullptr;
     }
--- a/widget/android/AndroidBridge.h
+++ b/widget/android/AndroidBridge.h
@@ -20,17 +20,17 @@
 #include "AndroidJavaWrappers.h"
 
 #include "nsIMutableArray.h"
 #include "nsIMIMEInfo.h"
 #include "nsColor.h"
 #include "gfxRect.h"
 
 #include "nsIAndroidBridge.h"
-#include "nsISmsRequest.h"
+#include "nsIMobileMessageCallback.h"
 
 #include "mozilla/Likely.h"
 #include "mozilla/StaticPtr.h"
 
 // Some debug #defines
 // #define DEBUG_ANDROID_EVENTS
 // #define DEBUG_ANDROID_WIDGET
 
@@ -309,24 +309,27 @@ public:
     bool InitCamera(const nsCString& contentType, uint32_t camera, uint32_t *width, uint32_t *height, uint32_t *fps);
 
     void CloseCamera();
 
     void EnableBatteryNotifications();
     void DisableBatteryNotifications();
     void GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo);
 
-    nsresult GetSegmentInfoForText(const nsAString& aText, dom::mobilemessage::SmsSegmentInfoData* aData);
-    void SendMessage(const nsAString& aNumber, const nsAString& aText, nsISmsRequest* aRequest);
-    void GetMessage(int32_t aMessageId, nsISmsRequest* aRequest);
-    void DeleteMessage(int32_t aMessageId, nsISmsRequest* aRequest);
-    void CreateMessageList(const dom::mobilemessage::SmsFilterData& aFilter, bool aReverse, nsISmsRequest* aRequest);
-    void GetNextMessageInList(int32_t aListId, nsISmsRequest* aRequest);
+    nsresult GetSegmentInfoForText(const nsAString& aText,
+                                   dom::mobilemessage::SmsSegmentInfoData* aData);
+    void SendMessage(const nsAString& aNumber, const nsAString& aText,
+                     nsIMobileMessageCallback* aRequest);
+    void GetMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequest);
+    void DeleteMessage(int32_t aMessageId, nsIMobileMessageCallback* aRequest);
+    void CreateMessageList(const dom::mobilemessage::SmsFilterData& aFilter,
+                           bool aReverse, nsIMobileMessageCallback* aRequest);
+    void GetNextMessageInList(int32_t aListId, nsIMobileMessageCallback* aRequest);
     void ClearMessageList(int32_t aListId);
-    already_AddRefed<nsISmsRequest> DequeueSmsRequest(uint32_t aRequestId);
+    already_AddRefed<nsIMobileMessageCallback> DequeueSmsRequest(uint32_t aRequestId);
 
     bool IsTablet();
 
     void GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo);
     void EnableNetworkNotifications();
     void DisableNetworkNotifications();
 
     void SetFirstPaintViewport(const nsIntPoint& aOffset, float aZoom, const nsIntRect& aPageRect, const gfx::Rect& aCssPageRect);
@@ -362,17 +365,17 @@ public:
     void GetGfxInfoData(nsACString& aRet);
     nsresult GetProxyForURI(const nsACString & aSpec,
                             const nsACString & aScheme,
                             const nsACString & aHost,
                             const int32_t      aPort,
                             nsACString & aResult);
 protected:
     static AndroidBridge *sBridge;
-    static StaticAutoPtr<nsTArray<nsCOMPtr<nsISmsRequest> > > sSmsRequests;
+    static StaticAutoPtr<nsTArray<nsCOMPtr<nsIMobileMessageCallback> > > sSmsRequests;
 
     // the global JavaVM
     JavaVM *mJavaVM;
 
     // the JNIEnv for the main thread
     JNIEnv *mJNIEnv;
     void *mThread;
 
@@ -393,17 +396,17 @@ protected:
     void* GetNativeSurface(JNIEnv* env, jobject surface);
 
     bool mHasNativeBitmapAccess;
     bool mHasNativeWindowAccess;
     bool mHasNativeWindowFallback;
 
     int mAPIVersion;
 
-    bool QueueSmsRequest(nsISmsRequest* aRequest, uint32_t* aRequestIdOut);
+    bool QueueSmsRequest(nsIMobileMessageCallback* aRequest, uint32_t* aRequestIdOut);
 
     // other things
     jmethodID jNotifyIME;
     jmethodID jNotifyIMEEnabled;
     jmethodID jNotifyIMEChange;
     jmethodID jAcknowledgeEvent;
     jmethodID jEnableLocation;
     jmethodID jEnableLocationHighAccuracy;
--- a/widget/android/AndroidJNI.cpp
+++ b/widget/android/AndroidJNI.cpp
@@ -240,17 +240,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
         nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
         if (!obs) {
           return NS_OK;
         }
 
         nsCOMPtr<nsIDOMMozSmsMessage> message = new SmsMessage(mMessageData);
         obs->NotifyObservers(message, kSmsSentObserverTopic, nullptr);
 
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifyMessageSent(message);
         return NS_OK;
       }
 
     private:
@@ -321,17 +321,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     public:
       NotifySmsSendFailedRunnable(int32_t aError,
                                   int32_t aRequestId)
         : mError(aError)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifySendMessageFailed(mError);
         return NS_OK;
       }
 
     private:
@@ -359,17 +359,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     public:
       NotifyGetSmsRunnable(const SmsMessageData& aMessageData,
                            int32_t aRequestId)
         : mMessageData(aMessageData)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         nsCOMPtr<nsIDOMMozSmsMessage> message = new SmsMessage(mMessageData);
         request->NotifyMessageGot(message);
         return NS_OK;
       }
 
@@ -403,17 +403,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     public:
       NotifyGetSmsFailedRunnable(int32_t aError,
                                  int32_t aRequestId)
         : mError(aError)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifyGetMessageFailed(mError);
         return NS_OK;
       }
 
     private:
@@ -435,17 +435,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     class NotifySmsDeletedRunnable : public nsRunnable {
     public:
       NotifySmsDeletedRunnable(bool aDeleted, int32_t aRequestId)
         : mDeleted(aDeleted)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifyMessageDeleted(mDeleted);
         return NS_OK;
       }
 
     private:
@@ -468,17 +468,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     public:
       NotifySmsDeleteFailedRunnable(int32_t aError,
                                     int32_t aRequestId)
         : mError(aError)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifyDeleteMessageFailed(mError);
         return NS_OK;
       }
 
     private:
@@ -498,17 +498,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
 {
     class NotifyNoMessageInListRunnable : public nsRunnable {
     public:
       NotifyNoMessageInListRunnable(int32_t aRequestId)
         : mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifyNoMessageInList();
         return NS_OK;
       }
 
     private:
@@ -538,17 +538,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
                                       const SmsMessageData& aMessageData,
                                       int32_t aRequestId)
         : mListId(aListId)
         , mMessageData(aMessageData)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         nsCOMPtr<nsIDOMMozSmsMessage> message = new SmsMessage(mMessageData);
         request->NotifyMessageListCreated(mListId, message);
         return NS_OK;
       }
 
@@ -590,17 +590,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     public:
       NotifyGotNextMessageRunnable(const SmsMessageData& aMessageData,
                                    int32_t aRequestId)
         : mMessageData(aMessageData)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         nsCOMPtr<nsIDOMMozSmsMessage> message = new SmsMessage(mMessageData);
         request->NotifyNextMessageInListGot(message);
         return NS_OK;
       }
 
@@ -636,17 +636,17 @@ Java_org_mozilla_gecko_GeckoSmsManager_n
     public:
       NotifyReadListFailedRunnable(int32_t aError,
                                    int32_t aRequestId)
         : mError(aError)
         , mRequestId(aRequestId)
       {}
 
       NS_IMETHODIMP Run() {
-        nsCOMPtr<nsISmsRequest> request =
+        nsCOMPtr<nsIMobileMessageCallback> request =
           AndroidBridge::Bridge()->DequeueSmsRequest(mRequestId);
         NS_ENSURE_TRUE(request, NS_ERROR_FAILURE);
 
         request->NotifyReadMessageListFailed(mError);
         return NS_OK;
       }
 
     private: