зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1793834 - part 1/12: adding a mostly-empty about:windows-messages page r=Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D161148
This commit is contained in:
Родитель
4bf00e9d1e
Коммит
5265544a3f
|
@ -279,6 +279,12 @@ var whitelist = [
|
|||
file: "resource://gre/localization/en-US/toolkit/about/aboutThirdParty.ftl",
|
||||
platforms: ["linux", "macosx"],
|
||||
},
|
||||
// Bug 1973834 - referenced by aboutWindowsMessages.html which is only for Windows
|
||||
{
|
||||
file:
|
||||
"resource://gre/localization/en-US/toolkit/about/aboutWindowsMessages.ftl",
|
||||
platforms: ["linux", "macosx"],
|
||||
},
|
||||
// Bug 1721741:
|
||||
// (The references to these files are dynamically generated, so the test can't
|
||||
// find the references)
|
||||
|
|
|
@ -157,6 +157,8 @@ static const RedirEntry kRedirMap[] = {
|
|||
#ifdef XP_WIN
|
||||
{"third-party", "chrome://global/content/aboutThirdParty.html",
|
||||
nsIAboutModule::ALLOW_SCRIPT},
|
||||
{"windows-messages", "chrome://global/content/aboutWindowsMessages.html",
|
||||
nsIAboutModule::ALLOW_SCRIPT},
|
||||
#endif
|
||||
#ifndef MOZ_GLEAN_ANDROID
|
||||
{"glean", "chrome://global/content/aboutGlean.html",
|
||||
|
|
|
@ -40,6 +40,7 @@ if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
|
|||
about_pages.append('profiles')
|
||||
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
about_pages.append('third-party')
|
||||
about_pages.append('windows-messages')
|
||||
if not defined('MOZ_GLEAN_ANDROID'):
|
||||
about_pages.append('glean')
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* -*- 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/. */
|
||||
|
||||
#include "AboutWindowsMessages.h"
|
||||
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
static StaticRefPtr<AboutWindowsMessages> sSingleton;
|
||||
|
||||
NS_IMPL_ISUPPORTS(AboutWindowsMessages, nsIAboutWindowsMessages);
|
||||
|
||||
/*static*/
|
||||
already_AddRefed<AboutWindowsMessages> AboutWindowsMessages::GetSingleton() {
|
||||
if (!sSingleton) {
|
||||
sSingleton = new AboutWindowsMessages;
|
||||
ClearOnShutdown(&sSingleton);
|
||||
}
|
||||
|
||||
return do_AddRef(sSingleton);
|
||||
}
|
||||
} // namespace mozilla
|
|
@ -0,0 +1,29 @@
|
|||
/* -*- 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 __AboutWindowsMessages_h__
|
||||
#define __AboutWindowsMessages_h__
|
||||
|
||||
#include "mozilla/MozPromise.h"
|
||||
#include "nsIAboutWindowsMessages.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class AboutWindowsMessages final : public nsIAboutWindowsMessages {
|
||||
~AboutWindowsMessages() = default;
|
||||
|
||||
public:
|
||||
static already_AddRefed<AboutWindowsMessages> GetSingleton();
|
||||
|
||||
AboutWindowsMessages() = default;
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIABOUTWINDOWSMESSAGES
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // __AboutWindowsMessages_h__
|
|
@ -0,0 +1,17 @@
|
|||
# -*- 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/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{ba8cdb8a-9624-493d-aac4-23ee83378d7c}',
|
||||
'contract_ids': ['@mozilla.org/about-windowsmessages;1'],
|
||||
'type': 'AboutWindowsMessages',
|
||||
'singleton': True,
|
||||
'constructor': 'mozilla::AboutWindowsMessages::GetSingleton',
|
||||
'headers': ['mozilla/AboutWindowsMessages.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
]
|
|
@ -0,0 +1,3 @@
|
|||
/* 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/. */
|
|
@ -0,0 +1,22 @@
|
|||
<!-- 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/. -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title data-l10n-id="windows-messages-page-title"></title>
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src chrome:; object-src 'none'">
|
||||
<link rel="stylesheet" href="chrome://global/content/aboutWindowsMessages.css">
|
||||
<link rel="localization" href="branding/brand.ftl"/>
|
||||
<link rel="localization" href="toolkit/about/aboutWindowsMessages.ftl"/>
|
||||
<script src="chrome://global/content/aboutWindowsMessages.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 data-l10n-id="windows-messages-page-title"></h1>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
let AboutWindowsMessages = null;
|
||||
|
||||
function onLoad() {}
|
||||
|
||||
try {
|
||||
AboutWindowsMessages = Cc["@mozilla.org/about-windowsmessages;1"].getService(
|
||||
Ci.nsIAboutWindowsMessages
|
||||
);
|
||||
document.addEventListener("DOMContentLoaded", onLoad, { once: true });
|
||||
} catch (ex) {
|
||||
// Do nothing if we fail to create a singleton instance,
|
||||
// showing the default no-module message.
|
||||
Cu.reportError(ex);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
# 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/.
|
||||
|
||||
toolkit.jar:
|
||||
content/global/aboutWindowsMessages.css (content/aboutWindowsMessages.css)
|
||||
content/global/aboutWindowsMessages.html (content/aboutWindowsMessages.html)
|
||||
content/global/aboutWindowsMessages.js (content/aboutWindowsMessages.js)
|
|
@ -0,0 +1,23 @@
|
|||
# -*- 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/.
|
||||
|
||||
with Files("**"):
|
||||
BUG_COMPONENT = ("Core", "Widget: Win32")
|
||||
|
||||
FINAL_LIBRARY = "xul"
|
||||
|
||||
JAR_MANIFESTS += ["jar.mn"]
|
||||
XPCOM_MANIFESTS += ["components.conf"]
|
||||
XPIDL_MODULE = "AboutWindowsMessages"
|
||||
XPIDL_SOURCES += ["nsIAboutWindowsMessages.idl"]
|
||||
|
||||
EXPORTS.mozilla += [
|
||||
"AboutWindowsMessages.h",
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
"AboutWindowsMessages.cpp",
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
|
||||
/* 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"
|
||||
|
||||
[scriptable, uuid(3c5cfbfd-545c-4910-a34a-203063914f96)]
|
||||
interface nsIAboutWindowsMessages : nsISupports
|
||||
{
|
||||
};
|
|
@ -115,7 +115,7 @@ if CONFIG["MOZ_UPDATE_AGENT"]:
|
|||
DIRS += ["build"]
|
||||
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
||||
DIRS += ["aboutthirdparty", "gfx"]
|
||||
DIRS += ["aboutthirdparty", "aboutwindowsmessages", "gfx"]
|
||||
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
|
||||
EXTRA_JS_MODULES += [
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# 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/.
|
||||
|
||||
### Localization for the about:windows-messages page, which is only available
|
||||
### on the Windows OS.
|
||||
### This page records and shows messages sent from the OS to individual browser
|
||||
### windows. These messages can be useful in debugging hard-to-reproduce issues
|
||||
### with window sizing and position.
|
||||
|
||||
windows-messages-page-title = Windows Messages Information
|
Загрузка…
Ссылка в новой задаче