Bug 1006051 - Implement nsIParentalControlsService on the Mac. r=smichaud
authorDoug Turner <doug.turner@gmail.com>
Mon, 05 May 2014 11:24:25 -0700
changeset 182004 7202bd8d3e1555912543af39a40322c6f280a9a0
parent 182003 fc5a504138485d2009e41f3476fe98aa8cdca867
child 182005 1cb4e164d59cfcd9189e51c241e694891a2b76c4
push id43187
push userryanvm@gmail.com
push dateWed, 07 May 2014 18:03:55 +0000
treeherdermozilla-inbound@7202bd8d3e15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs1006051
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1006051 - Implement nsIParentalControlsService on the Mac. r=smichaud
toolkit/components/build/moz.build
toolkit/components/build/nsToolkitCompsModule.cpp
toolkit/components/parentalcontrols/moz.build
toolkit/components/parentalcontrols/nsParentalControlsService.h
toolkit/components/parentalcontrols/nsParentalControlsServiceCocoa.mm
toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp
toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp
toolkit/components/parentalcontrols/nsParentalControlsServiceWin.h
--- a/toolkit/components/build/moz.build
+++ b/toolkit/components/build/moz.build
@@ -26,12 +26,12 @@ LOCAL_INCLUDES += [
     '../jsdownloads/src',
     '../protobuf',
     '../startup',
     '../statusfilter',
     '../typeaheadfind',
     '../url-classifier',
 ]
 
-if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']:
     LOCAL_INCLUDES += [
         '../parentalcontrols',
     ]
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -6,18 +6,18 @@
 #include "nsAppStartup.h"
 #include "nsUserInfo.h"
 #include "nsToolkitCompsCID.h"
 #include "nsFindService.h"
 #if defined(USE_MOZ_UPDATER)
 #include "nsUpdateDriver.h"
 #endif
 
-#if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
-#include "nsParentalControlsServiceWin.h"
+#if !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
+#include "nsParentalControlsService.h"
 #endif
 
 #include "nsAlertsService.h"
 
 #include "nsDownloadManager.h"
 #include "DownloadPlatform.h"
 #include "nsDownloadProxy.h"
 #include "rdf.h"
@@ -39,18 +39,18 @@
 using namespace mozilla;
 
 /////////////////////////////////////////////////////////////////////////////
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUserInfo)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFindService)
 
-#if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsParentalControlsServiceWin)
+#if !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsParentalControlsService)
 #endif
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAlertsService)
 
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsDownloadManager,
                                          nsDownloadManager::GetSingleton)
 NS_GENERIC_FACTORY_CONSTRUCTOR(DownloadPlatform)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy)
@@ -89,17 +89,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowser
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUpdateProcessor)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR(FinalizationWitnessService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(NativeOSFileInternalsService)
 
 NS_DEFINE_NAMED_CID(NS_TOOLKIT_APPSTARTUP_CID);
 NS_DEFINE_NAMED_CID(NS_USERINFO_CID);
 NS_DEFINE_NAMED_CID(NS_ALERTSSERVICE_CID);
-#if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
+#if !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
 NS_DEFINE_NAMED_CID(NS_PARENTALCONTROLSSERVICE_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_DOWNLOADMANAGER_CID);
 NS_DEFINE_NAMED_CID(NS_DOWNLOADPLATFORM_CID);
 NS_DEFINE_NAMED_CID(NS_DOWNLOAD_CID);
 NS_DEFINE_NAMED_CID(NS_FIND_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_TYPEAHEADFIND_CID);
 #ifdef MOZ_URL_CLASSIFIER
@@ -115,18 +115,18 @@ NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_C
 #endif
 NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID);
 NS_DEFINE_NAMED_CID(NATIVE_OSFILE_INTERNALS_SERVICE_CID);
 
 static const Module::CIDEntry kToolkitCIDs[] = {
   { &kNS_TOOLKIT_APPSTARTUP_CID, false, nullptr, nsAppStartupConstructor },
   { &kNS_USERINFO_CID, false, nullptr, nsUserInfoConstructor },
   { &kNS_ALERTSSERVICE_CID, false, nullptr, nsAlertsServiceConstructor },
-#if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
-  { &kNS_PARENTALCONTROLSSERVICE_CID, false, nullptr, nsParentalControlsServiceWinConstructor },
+#if !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
+  { &kNS_PARENTALCONTROLSSERVICE_CID, false, nullptr, nsParentalControlsServiceConstructor },
 #endif
   { &kNS_DOWNLOADMANAGER_CID, false, nullptr, nsDownloadManagerConstructor },
   { &kNS_DOWNLOADPLATFORM_CID, false, nullptr, DownloadPlatformConstructor },
   { &kNS_DOWNLOAD_CID, false, nullptr, nsDownloadProxyConstructor },
   { &kNS_FIND_SERVICE_CID, false, nullptr, nsFindServiceConstructor },
   { &kNS_TYPEAHEADFIND_CID, false, nullptr, nsTypeAheadFindConstructor },
 #ifdef MOZ_URL_CLASSIFIER
   { &kNS_APPLICATION_REPUTATION_SERVICE_CID, false, nullptr, ApplicationReputationServiceConstructor },
@@ -143,17 +143,17 @@ static const Module::CIDEntry kToolkitCI
   { &kNATIVE_OSFILE_INTERNALS_SERVICE_CID, false, nullptr, NativeOSFileInternalsServiceConstructor },
   { nullptr }
 };
 
 static const Module::ContractIDEntry kToolkitContracts[] = {
   { NS_APPSTARTUP_CONTRACTID, &kNS_TOOLKIT_APPSTARTUP_CID },
   { NS_USERINFO_CONTRACTID, &kNS_USERINFO_CID },
   { NS_ALERTSERVICE_CONTRACTID, &kNS_ALERTSSERVICE_CID },
-#if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
+#if !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
   { NS_PARENTALCONTROLSSERVICE_CONTRACTID, &kNS_PARENTALCONTROLSSERVICE_CID },
 #endif
   { NS_DOWNLOADMANAGER_CONTRACTID, &kNS_DOWNLOADMANAGER_CID },
   { NS_DOWNLOADPLATFORM_CONTRACTID, &kNS_DOWNLOADPLATFORM_CID },
   { NS_TRANSFER_CONTRACTID, &kNS_DOWNLOAD_CID },
   { NS_FIND_SERVICE_CONTRACTID, &kNS_FIND_SERVICE_CID },
   { NS_TYPEAHEADFIND_CONTRACTID, &kNS_TYPEAHEADFIND_CID },
 #ifdef MOZ_URL_CLASSIFIER
--- a/toolkit/components/parentalcontrols/moz.build
+++ b/toolkit/components/parentalcontrols/moz.build
@@ -5,13 +5,23 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'nsIParentalControlsService.idl',
 ]
 
 XPIDL_MODULE = 'parentalcontrols'
 
-if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS'] and CONFIG['OS_ARCH'] == 'WINNT':
-    SOURCES += [
-        'nsParentalControlsServiceWin.cpp',
-    ]
-    FINAL_LIBRARY = 'toolkitcomps'
+if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']:
+    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+        SOURCES += [
+            'nsParentalControlsServiceWin.cpp',
+        ]
+    elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+        UNIFIED_SOURCES += [
+            'nsParentalControlsServiceCocoa.mm',
+        ]
+    else:
+        SOURCES += [
+            'nsParentalControlsServiceDefault.cpp',
+        ]
+
+FINAL_LIBRARY = 'toolkitcomps'
new file mode 100644
--- /dev/null
+++ b/toolkit/components/parentalcontrols/nsParentalControlsService.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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 nsParentalControlsService_h__
+#define nsParentalControlsService_h__
+
+#include "nsIParentalControlsService.h"
+#include "nsCOMPtr.h"
+#include "nsAutoPtr.h"
+#include "nsIURI.h"
+
+#if defined(XP_WIN)
+// wpcevents.h requires this be elevated
+#if (WINVER < 0x0600)
+# undef WINVER
+# define WINVER 0x0600
+#endif
+#include <wpcapi.h>
+#include <wpcevent.h>
+#endif
+
+class nsParentalControlsService : public nsIParentalControlsService
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_NSIPARENTALCONTROLSSERVICE
+
+  nsParentalControlsService();
+  virtual ~nsParentalControlsService();
+
+private:
+  bool mEnabled;
+#if defined(XP_WIN)
+  REGHANDLE mProvider;
+  IWindowsParentalControls * mPC;
+  void LogFileDownload(bool blocked, nsIURI *aSource, nsIFile *aTarget);
+#endif
+};
+
+#endif /* nsParentalControlsService_h__ */
new file mode 100644
--- /dev/null
+++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceCocoa.mm
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
+/* 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 "nsParentalControlsService.h"
+#include "nsString.h"
+#include "nsIFile.h"
+
+#import <Cocoa/Cocoa.h>
+
+NS_IMPL_ISUPPORTS(nsParentalControlsService, nsIParentalControlsService)
+
+nsParentalControlsService::nsParentalControlsService() :
+  mEnabled(false)
+{
+  mEnabled = CFPreferencesAppValueIsForced(CFSTR("restrictWeb"),
+                                           CFSTR("com.apple.familycontrols.contentfilter"));
+}
+
+nsParentalControlsService::~nsParentalControlsService()
+{
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
+{
+  *aResult = mEnabled;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::GetBlockFileDownloadsEnabled(bool *aResult)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::GetLoggingEnabled(bool *aResult)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::Log(int16_t aEntryType,
+                               bool blocked,
+                               nsIURI *aSource,
+                               nsIFile *aTarget)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
+                                              nsIInterfaceRequestor *aCocoadowContext,
+                                              bool *_retval)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets,
+                                               nsIInterfaceRequestor *aCocoadowContext,
+                                               bool *_retval)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
new file mode 100644
--- /dev/null
+++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
+/* 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 "nsParentalControlsService.h"
+#include "nsString.h"
+#include "nsIFile.h"
+
+NS_IMPL_ISUPPORTS(nsParentalControlsService, nsIParentalControlsService)
+
+nsParentalControlsService::nsParentalControlsService()
+{
+}
+
+nsParentalControlsService::~nsParentalControlsService()
+{
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
+{
+  *aResult = false;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::GetBlockFileDownloadsEnabled(bool *aResult)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::GetLoggingEnabled(bool *aResult)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::Log(int16_t aEntryType,
+                               bool blocked,
+                               nsIURI *aSource,
+                               nsIFile *aTarget)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
+                                              nsIInterfaceRequestor *aCocoadowContext,
+                                              bool *_retval)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
+
+NS_IMETHODIMP
+nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets,
+                                               nsIInterfaceRequestor *aCocoadowContext,
+                                               bool *_retval)
+{
+  return NS_ERROR_NOT_AVAILABLE;
+}
--- a/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp
+++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp
@@ -1,36 +1,36 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
 /* 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 "nsParentalControlsServiceWin.h"
+#include "nsParentalControlsService.h"
 #include "nsString.h"
 #include "nsIArray.h"
 #include "nsIWidget.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIFile.h"
 #include "nsILocalFileWin.h"
 #include "nsArrayUtils.h"
 #include "nsIXULAppInfo.h"
 
 static const CLSID CLSID_WinParentalControls = {0xE77CC89B,0x7401,0x4C04,{0x8C,0xED,0x14,0x9D,0xB3,0x5A,0xDD,0x04}};
 static const IID IID_IWinParentalControls  = {0x28B4D88B,0xE072,0x49E6,{0x80,0x4D,0x26,0xED,0xBE,0x21,0xA7,0xB9}};
 
-NS_IMPL_ISUPPORTS(nsParentalControlsServiceWin, nsIParentalControlsService)
+NS_IMPL_ISUPPORTS(nsParentalControlsService, nsIParentalControlsService)
 
 static HINSTANCE gAdvAPIDLLInst = nullptr;
 
 decltype(EventWrite)* gEventWrite = nullptr;
 decltype(EventRegister)* gEventRegister = nullptr;
 decltype(EventUnregister)* gEventUnregister = nullptr;
 
-nsParentalControlsServiceWin::nsParentalControlsServiceWin() :
+nsParentalControlsService::nsParentalControlsService() :
   mEnabled(false)
 , mProvider(0)
 , mPC(nullptr)
 {
   HRESULT hr;
   CoInitialize(nullptr);
   hr = CoCreateInstance(CLSID_WinParentalControls, nullptr, CLSCTX_INPROC,
                         IID_IWinParentalControls, (void**)&mPC);
@@ -55,43 +55,43 @@ nsParentalControlsServiceWin::nsParental
       gEventWrite = (decltype(EventWrite)*) GetProcAddress(gAdvAPIDLLInst, "EventWrite");
       gEventRegister = (decltype(EventRegister)*) GetProcAddress(gAdvAPIDLLInst, "EventRegister");
       gEventUnregister = (decltype(EventUnregister)*) GetProcAddress(gAdvAPIDLLInst, "EventUnregister");
     }
     mEnabled = true;
   }
 }
 
-nsParentalControlsServiceWin::~nsParentalControlsServiceWin()
+nsParentalControlsService::~nsParentalControlsService()
 {
   if (mPC)
     mPC->Release();
 
   if (gEventUnregister && mProvider)
     gEventUnregister(mProvider);
 
   if (gAdvAPIDLLInst)
     ::FreeLibrary(gAdvAPIDLLInst);
 }
 
 //------------------------------------------------------------------------
 
 NS_IMETHODIMP
-nsParentalControlsServiceWin::GetParentalControlsEnabled(bool *aResult)
+nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
 {
   *aResult = false;
 
   if (mEnabled)
     *aResult = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsParentalControlsServiceWin::GetBlockFileDownloadsEnabled(bool *aResult)
+nsParentalControlsService::GetBlockFileDownloadsEnabled(bool *aResult)
 {
   *aResult = false;
 
   if (!mEnabled)
     return NS_ERROR_NOT_AVAILABLE;
 
   nsRefPtr<IWPCWebSettings> wpcws;
   if (SUCCEEDED(mPC->GetWebSettings(nullptr, getter_AddRefs(wpcws)))) {
@@ -100,17 +100,17 @@ nsParentalControlsServiceWin::GetBlockFi
     if (settings == WPCFLAG_WEB_SETTING_DOWNLOADSBLOCKED)
       *aResult = true;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsParentalControlsServiceWin::GetLoggingEnabled(bool *aResult)
+nsParentalControlsService::GetLoggingEnabled(bool *aResult)
 {
   *aResult = false;
 
   if (!mEnabled)
     return NS_ERROR_NOT_AVAILABLE;
 
   // Check the general purpose logging flag
   nsRefPtr<IWPCSettings> wpcs;
@@ -121,17 +121,17 @@ nsParentalControlsServiceWin::GetLogging
       *aResult = true;
   }
 
   return NS_OK;
 }
 
 // Post a log event to the system
 NS_IMETHODIMP
-nsParentalControlsServiceWin::Log(int16_t aEntryType, bool blocked, nsIURI *aSource, nsIFile *aTarget)
+nsParentalControlsService::Log(int16_t aEntryType, bool blocked, nsIURI *aSource, nsIFile *aTarget)
 {
   if (!mEnabled)
     return NS_ERROR_NOT_AVAILABLE;
 
   NS_ENSURE_ARG_POINTER(aSource);
 
   // Confirm we should be logging
   bool enabled;
@@ -158,17 +158,17 @@ nsParentalControlsServiceWin::Log(int16_
       break;
   }
 
   return NS_OK;
 }
 
 // Override a single URI
 NS_IMETHODIMP
-nsParentalControlsServiceWin::RequestURIOverride(nsIURI *aTarget, nsIInterfaceRequestor *aWindowContext, bool *_retval)
+nsParentalControlsService::RequestURIOverride(nsIURI *aTarget, nsIInterfaceRequestor *aWindowContext, bool *_retval)
 {
   *_retval = false;
 
   if (!mEnabled)
     return NS_ERROR_NOT_AVAILABLE;
 
   NS_ENSURE_ARG_POINTER(aTarget);
 
@@ -194,17 +194,17 @@ nsParentalControlsServiceWin::RequestURI
   }
 
 
   return NS_OK;
 }
 
 // Override a web page
 NS_IMETHODIMP
-nsParentalControlsServiceWin::RequestURIOverrides(nsIArray *aTargets, nsIInterfaceRequestor *aWindowContext, bool *_retval)
+nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets, nsIInterfaceRequestor *aWindowContext, bool *_retval)
 {
   *_retval = false;
 
   if (!mEnabled)
     return NS_ERROR_NOT_AVAILABLE;
 
   NS_ENSURE_ARG_POINTER(aTargets);
 
@@ -279,17 +279,17 @@ nsParentalControlsServiceWin::RequestURI
 
   return NS_OK;
 }
 
 //------------------------------------------------------------------------
 
 // Sends a file download event to the Vista Event Log 
 void
-nsParentalControlsServiceWin::LogFileDownload(bool blocked, nsIURI *aSource, nsIFile *aTarget)
+nsParentalControlsService::LogFileDownload(bool blocked, nsIURI *aSource, nsIFile *aTarget)
 {
   nsAutoCString curi;
 
   if (!gEventWrite)
     return;
 
   // Note, EventDataDescCreate is a macro defined in the headers, not a function
 
deleted file mode 100644
--- a/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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 nsParentalControlsServiceWin_h__
-#define nsParentalControlsServiceWin_h__
-
-#include "nsIParentalControlsService.h"
-#include "nsCOMPtr.h"
-#include "nsAutoPtr.h"
-#include "nsIURI.h"
-
-// wpcevents.h requires this be elevated
-#if (WINVER < 0x0600)
-# undef WINVER
-# define WINVER 0x0600
-#endif
-
-#include <wpcapi.h>
-#include <wpcevent.h>
-
-class nsParentalControlsServiceWin : public nsIParentalControlsService
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIPARENTALCONTROLSSERVICE
-
-  nsParentalControlsServiceWin();
-  virtual ~nsParentalControlsServiceWin();
-
-private:
-  bool mEnabled;
-  REGHANDLE mProvider;
-  IWindowsParentalControls * mPC;
-
-  void LogFileDownload(bool blocked, nsIURI *aSource, nsIFile *aTarget);
-};
-
-#endif /* nsParentalControlsServiceWin_h__ */