summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp158
-rw-r--r--toolkit/components/diskspacewatcher/DiskSpaceWatcher.h32
-rw-r--r--toolkit/components/diskspacewatcher/moz.build23
-rw-r--r--toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl25
-rw-r--r--toolkit/components/moz.build1
-rw-r--r--toolkit/content/gmp-sources/eme-adobe.json31
-rw-r--r--toolkit/content/jar.mn1
-rw-r--r--toolkit/mozapps/extensions/GMPUtils.jsm11
-rw-r--r--toolkit/mozapps/extensions/internal/GMPProvider.jsm11
-rw-r--r--toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm3
10 files changed, 3 insertions, 293 deletions
diff --git a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp
deleted file mode 100644
index 7f3b8cd08..000000000
--- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/* 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 "DiskSpaceWatcher.h"
-#include "nsIObserverService.h"
-#include "nsXULAppAPI.h"
-#include "mozilla/Hal.h"
-#include "mozilla/ModuleUtils.h"
-#include "mozilla/Preferences.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/Services.h"
-
-#define NS_DISKSPACEWATCHER_CID \
- { 0xab218518, 0xf197, 0x4fb4, { 0x8b, 0x0f, 0x8b, 0xb3, 0x4d, 0xf2, 0x4b, 0xf4 } }
-
-using namespace mozilla;
-
-StaticRefPtr<DiskSpaceWatcher> gDiskSpaceWatcher;
-
-NS_IMPL_ISUPPORTS(DiskSpaceWatcher, nsIDiskSpaceWatcher, nsIObserver)
-
-uint64_t DiskSpaceWatcher::sFreeSpace = 0;
-bool DiskSpaceWatcher::sIsDiskFull = false;
-
-DiskSpaceWatcher::DiskSpaceWatcher()
-{
- MOZ_ASSERT(NS_IsMainThread());
- MOZ_ASSERT(!gDiskSpaceWatcher);
-}
-
-DiskSpaceWatcher::~DiskSpaceWatcher()
-{
- MOZ_ASSERT(!gDiskSpaceWatcher);
-}
-
-already_AddRefed<DiskSpaceWatcher>
-DiskSpaceWatcher::FactoryCreate()
-{
- if (!XRE_IsParentProcess()) {
- return nullptr;
- }
-
- MOZ_ASSERT(NS_IsMainThread());
-
- if (!Preferences::GetBool("disk_space_watcher.enabled", false)) {
- return nullptr;
- }
-
- if (!gDiskSpaceWatcher) {
- gDiskSpaceWatcher = new DiskSpaceWatcher();
- ClearOnShutdown(&gDiskSpaceWatcher);
- }
-
- RefPtr<DiskSpaceWatcher> service = gDiskSpaceWatcher.get();
- return service.forget();
-}
-
-NS_IMETHODIMP
-DiskSpaceWatcher::Observe(nsISupports* aSubject, const char* aTopic,
- const char16_t* aData)
-{
- MOZ_ASSERT(NS_IsMainThread());
-
- if (!strcmp(aTopic, "profile-after-change")) {
- nsCOMPtr<nsIObserverService> observerService =
- mozilla::services::GetObserverService();
- observerService->AddObserver(this, "profile-before-change", false);
- mozilla::hal::StartDiskSpaceWatcher();
- return NS_OK;
- }
-
- if (!strcmp(aTopic, "profile-before-change")) {
- nsCOMPtr<nsIObserverService> observerService =
- mozilla::services::GetObserverService();
- observerService->RemoveObserver(this, "profile-before-change");
- mozilla::hal::StopDiskSpaceWatcher();
- return NS_OK;
- }
-
- MOZ_ASSERT(false, "DiskSpaceWatcher got unexpected topic!");
- return NS_ERROR_UNEXPECTED;
-}
-
-NS_IMETHODIMP DiskSpaceWatcher::GetIsDiskFull(bool* aIsDiskFull)
-{
- *aIsDiskFull = sIsDiskFull;
- return NS_OK;
-}
-
-// GetFreeSpace is a macro on windows, and that messes up with the c++
-// compiler.
-#ifdef XP_WIN
-#undef GetFreeSpace
-#endif
-NS_IMETHODIMP DiskSpaceWatcher::GetFreeSpace(uint64_t* aFreeSpace)
-{
- *aFreeSpace = sFreeSpace;
- return NS_OK;
-}
-
-// static
-void DiskSpaceWatcher::UpdateState(bool aIsDiskFull, uint64_t aFreeSpace)
-{
- MOZ_ASSERT(NS_IsMainThread());
- if (!gDiskSpaceWatcher) {
- return;
- }
-
- nsCOMPtr<nsIObserverService> observerService =
- mozilla::services::GetObserverService();
-
- sIsDiskFull = aIsDiskFull;
- sFreeSpace = aFreeSpace;
-
- if (!observerService) {
- return;
- }
-
- const char16_t stateFull[] = { 'f', 'u', 'l', 'l', 0 };
- const char16_t stateFree[] = { 'f', 'r', 'e', 'e', 0 };
-
- nsCOMPtr<nsISupports> subject;
- CallQueryInterface(gDiskSpaceWatcher.get(), getter_AddRefs(subject));
- MOZ_ASSERT(subject);
- observerService->NotifyObservers(subject,
- DISKSPACEWATCHER_OBSERVER_TOPIC,
- sIsDiskFull ? stateFull : stateFree);
- return;
-}
-
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(DiskSpaceWatcher,
- DiskSpaceWatcher::FactoryCreate)
-
-NS_DEFINE_NAMED_CID(NS_DISKSPACEWATCHER_CID);
-
-static const mozilla::Module::CIDEntry kDiskSpaceWatcherCIDs[] = {
- { &kNS_DISKSPACEWATCHER_CID, false, nullptr, DiskSpaceWatcherConstructor },
- { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kDiskSpaceWatcherContracts[] = {
- { "@mozilla.org/toolkit/disk-space-watcher;1", &kNS_DISKSPACEWATCHER_CID },
- { nullptr }
-};
-
-static const mozilla::Module::CategoryEntry kDiskSpaceWatcherCategories[] = {
- { nullptr }
-};
-
-static const mozilla::Module kDiskSpaceWatcherModule = {
- mozilla::Module::kVersion,
- kDiskSpaceWatcherCIDs,
- kDiskSpaceWatcherContracts,
- kDiskSpaceWatcherCategories
-};
-
-NSMODULE_DEFN(DiskSpaceWatcherModule) = &kDiskSpaceWatcherModule;
diff --git a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h
deleted file mode 100644
index 6559af3cd..000000000
--- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* 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 __DISKSPACEWATCHER_H__
-
-#include "nsIDiskSpaceWatcher.h"
-#include "nsIObserver.h"
-#include "nsCOMPtr.h"
-
-class DiskSpaceWatcher final : public nsIDiskSpaceWatcher,
- public nsIObserver
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSIDISKSPACEWATCHER
- NS_DECL_NSIOBSERVER
-
- static already_AddRefed<DiskSpaceWatcher>
- FactoryCreate();
-
- static void UpdateState(bool aIsDiskFull, uint64_t aFreeSpace);
-
-private:
- DiskSpaceWatcher();
- ~DiskSpaceWatcher();
-
- static uint64_t sFreeSpace;
- static bool sIsDiskFull;
-};
-
-#endif // __DISKSPACEWATCHER_H__
diff --git a/toolkit/components/diskspacewatcher/moz.build b/toolkit/components/diskspacewatcher/moz.build
deleted file mode 100644
index 168af46a6..000000000
--- a/toolkit/components/diskspacewatcher/moz.build
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-XPIDL_SOURCES += [
- 'nsIDiskSpaceWatcher.idl',
-]
-
-EXPORTS += [
- 'DiskSpaceWatcher.h'
-]
-
-XPIDL_MODULE = 'diskspacewatcher'
-
-SOURCES = [
- 'DiskSpaceWatcher.cpp',
-]
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl b/toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl
deleted file mode 100644
index a9c60ca9f..000000000
--- a/toolkit/components/diskspacewatcher/nsIDiskSpaceWatcher.idl
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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"
-
-%{ C++
-#ifdef XP_WIN
-#undef GetFreeSpace
-#endif
-%}
-
-[scriptable, uuid(3aceba74-2ed5-4e99-8fe4-06e90e2b8ef0)]
-interface nsIDiskSpaceWatcher : nsISupports
-{
- readonly attribute bool isDiskFull; // True if we are low on disk space.
- readonly attribute unsigned long long freeSpace; // The free space currently available.
-};
-
-%{ C++
-#define DISKSPACEWATCHER_CONTRACTID "@mozilla.org/toolkit/disk-space-watcher;1"
-
-// The data for this notification will be either 'free' or 'full'.
-#define DISKSPACEWATCHER_OBSERVER_TOPIC "disk-space-watcher"
-%}
diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build
index 3f17bfb6d..d9dae12d1 100644
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -24,7 +24,6 @@ DIRS += [
'contextualidentity',
'cookie',
'crashmonitor',
- 'diskspacewatcher',
'downloads',
'exthelper',
'filewatcher',
diff --git a/toolkit/content/gmp-sources/eme-adobe.json b/toolkit/content/gmp-sources/eme-adobe.json
deleted file mode 100644
index 3bd808be8..000000000
--- a/toolkit/content/gmp-sources/eme-adobe.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "vendors": {
- "gmp-eme-adobe": {
- "platforms": {
- "WINNT_x86-msvc-x64": {
- "alias": "WINNT_x86-msvc"
- },
- "WINNT_x86-msvc": {
- "fileUrl": "https://cdmdownload.adobe.com/firefox/win/x86/primetime_gmp_win_x86_gmc_40673.zip",
- "hashValue": "8aad35fc13814b0f1daacddb0d599eedd685287d5afddc97c2f740c8aea270636ccd75b1d1a57364b84e8eb1b23c9f1c126c057d95f3d8217b331dc4b1d5340f",
- "filesize": 3694349
- },
- "WINNT_x86_64-msvc-x64": {
- "alias": "WINNT_x86_64-msvc"
- },
- "WINNT_x86-msvc-x86": {
- "alias": "WINNT_x86-msvc"
- },
- "WINNT_x86_64-msvc": {
- "fileUrl": "https://cdmdownload.adobe.com/firefox/win/x64/primetime_gmp_win_x64_gmc_40673.zip",
- "hashValue": "bd1e1a370c5f9dadc247c9f00dd203fab1a75ff3afed8439a0a0bfcc7e1767d0da68497140cbe48daa70e2535dde5f220dd7b344619cecd830a6b685efb9d5a0",
- "filesize": 4853103
- }
- },
- "version": "17"
- }
- },
- "hashFunction": "sha512",
- "name": "CDM-17",
- "schema_version": 1000
-}
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
index 5bf6440be..5a940679b 100644
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -127,6 +127,5 @@ toolkit.jar:
content/global/macWindowMenu.js
#endif
content/global/svg/svgBindings.xml (/layout/svg/resources/content/svgBindings.xml)
- content/global/gmp-sources/eme-adobe.json (gmp-sources/eme-adobe.json)
content/global/gmp-sources/openh264.json (gmp-sources/openh264.json)
content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json)
diff --git a/toolkit/mozapps/extensions/GMPUtils.jsm b/toolkit/mozapps/extensions/GMPUtils.jsm
index a199b4d86..814ae4914 100644
--- a/toolkit/mozapps/extensions/GMPUtils.jsm
+++ b/toolkit/mozapps/extensions/GMPUtils.jsm
@@ -7,8 +7,7 @@
const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} =
Components;
-this.EXPORTED_SYMBOLS = [ "EME_ADOBE_ID",
- "GMP_PLUGIN_IDS",
+this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS",
"GMPPrefs",
"GMPUtils",
"OPEN_H264_ID",
@@ -20,9 +19,8 @@ Cu.import("resource://gre/modules/AppConstants.jsm");
// GMP IDs
const OPEN_H264_ID = "gmp-gmpopenh264";
-const EME_ADOBE_ID = "gmp-eme-adobe";
const WIDEVINE_ID = "gmp-widevinecdm";
-const GMP_PLUGIN_IDS = [ OPEN_H264_ID, EME_ADOBE_ID, WIDEVINE_ID ];
+const GMP_PLUGIN_IDS = [ OPEN_H264_ID, WIDEVINE_ID ];
var GMPPluginUnsupportedReason = {
NOT_WINDOWS: 1,
@@ -72,10 +70,7 @@ this.GMPUtils = {
if (this._isPluginForceSupported(aPlugin)) {
return true;
}
- if (aPlugin.id == EME_ADOBE_ID) {
- // Windows Vista and later only supported by Adobe EME.
- return AppConstants.isPlatformAndVersionAtLeast("win", "6");
- } else if (aPlugin.id == WIDEVINE_ID) {
+ if (aPlugin.id == WIDEVINE_ID) {
// The Widevine plugin is available for Windows versions Vista and later,
// Mac OSX, and Linux.
return AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
index 131db7249..39d8f2d98 100644
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -49,17 +49,6 @@ const GMP_PLUGINS = [
homepageURL: "http://www.openh264.org/",
optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul"
},
-/*
- {
- id: EME_ADOBE_ID,
- name: "eme-adobe_name",
- description: "eme-adobe_description",
- licenseURL: "http://help.adobe.com/en_US/primetime/drm/HTML5_CDM_EULA/index.html",
- homepageURL: "http://help.adobe.com/en_US/primetime/drm/HTML5_CDM",
- optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul",
- isEME: true
- },
-*/
{
id: WIDEVINE_ID,
name: "widevine_description",
diff --git a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
index f98dd2a94..c6324da0a 100644
--- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
@@ -7,9 +7,6 @@
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const LOCAL_EME_SOURCES = [{
- "id": "gmp-eme-adobe",
- "src": "chrome://global/content/gmp-sources/eme-adobe.json"
-}, {
"id": "gmp-gmpopenh264",
"src": "chrome://global/content/gmp-sources/openh264.json"
}, {