tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

PropertyBagUtils.h (1088B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef IPC_PropertyBagUtils_h
      8 #define IPC_PropertyBagUtils_h
      9 
     10 #include "chrome/common/ipc_message_utils.h"
     11 #include "nsIPropertyBag2.h"
     12 #include "nsIVariant.h"
     13 
     14 namespace IPC {
     15 
     16 /**
     17 * Limited nsIVariant support. Not all types are implemented and only
     18 * nsIURI is implemented with nsIVariant::GetAsInterface.
     19 */
     20 template <>
     21 struct ParamTraits<nsIVariant*> {
     22  static void Write(MessageWriter* aWriter, nsIVariant* aParam);
     23  static bool Read(MessageReader* aReader, RefPtr<nsIVariant>* aResult);
     24 };
     25 
     26 template <>
     27 struct ParamTraits<nsIPropertyBag2*> {
     28  static void Write(MessageWriter* aWriter, nsIPropertyBag2* aParam);
     29  static bool Read(MessageReader* aReader, RefPtr<nsIPropertyBag2>* aResult);
     30 };
     31 
     32 }  // namespace IPC
     33 
     34 #endif  // mozilla_ipc_URIUtils_h