зеркало из https://github.com/mozilla/gecko-dev.git
48 строки
1.7 KiB
C++
48 строки
1.7 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* 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_DOMPrefs_h
|
|
#define mozilla_dom_DOMPrefs_h
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
class DOMPrefs final
|
|
{
|
|
public:
|
|
// Returns true if the browser.dom.window.dump.enabled pref is set.
|
|
static bool DumpEnabled();
|
|
|
|
// Returns true if the canvas.imagebitmap_extensions.enabled pref is set.
|
|
static bool ImageBitmapExtensionsEnabled();
|
|
static bool ImageBitmapExtensionsEnabled(JSContext* aCx, JSObject* aObj);
|
|
|
|
// Returns true if the dom.caches.enabled pref is set.
|
|
static bool DOMCachesEnabled();
|
|
static bool DOMCachesEnabled(JSContext* aCx, JSObject* aObj);
|
|
|
|
// Returns true if the dom.caches.testing.enabled pref is set.
|
|
static bool DOMCachesTestingEnabled();
|
|
|
|
// Returns true if the dom.performance.enable_user_timing_logging pref is set.
|
|
static bool PerformanceLoggingEnabled();
|
|
|
|
// Returns true if the dom.webnotifications.enabled pref is set.
|
|
// Note that you should use NotificationEnabledInServiceWorkers if you need to
|
|
// enable Notification API for ServiceWorkers
|
|
static bool NotificationEnabled();
|
|
|
|
// Returns true if the dom.webnotifications.serviceworker.enabled pref is set.
|
|
static bool NotificationEnabledInServiceWorkers();
|
|
static bool NotificationEnabledInServiceWorkers(JSContext* aCx,
|
|
JSObject* aObj);
|
|
};
|
|
|
|
} // dom namespace
|
|
} // mozilla namespace
|
|
|
|
#endif // mozilla_dom_DOMPrefs_h
|