Bug 1489812 - Part 2: Remove @mozilla.org/editor-utils;1; r=masayuki

Differential Revision: https://phabricator.services.mozilla.com/D5374
This commit is contained in:
Ehsan Akhgari 2018-09-08 18:52:15 -04:00
Родитель d19f79f590
Коммит 9fcc4e5b9a
9 изменённых файлов: 16 добавлений и 78 удалений

Просмотреть файл

@ -223,8 +223,6 @@
@RESPATH@/components/NetworkGeolocationProvider.manifest
@RESPATH@/components/NetworkGeolocationProvider.js
@RESPATH@/components/extensions.manifest
@RESPATH@/components/EditorUtils.manifest
@RESPATH@/components/EditorUtils.js
@RESPATH@/components/addonManager.js
@RESPATH@/components/amContentHandler.js
@RESPATH@/components/amInstallTrigger.js

Просмотреть файл

@ -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/. */
"use strict";
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
const EDITORUTILS_CID = Components.ID('{12e63991-86ac-4dff-bb1a-703495d67d17}');
function EditorUtils() {
}
EditorUtils.prototype = {
classID: EDITORUTILS_CID,
QueryInterface: ChromeUtils.generateQI([ Ci.nsIEditorUtils ]),
slurpBlob(aBlob, aScope, aListener) {
let reader = new aScope.FileReader();
reader.addEventListener("load", (event) => {
aListener.onResult(event.target.result);
});
reader.addEventListener("error", (event) => {
aListener.onError(event.target.error.message);
});
reader.readAsBinaryString(aBlob);
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([EditorUtils]);

Просмотреть файл

@ -1,2 +0,0 @@
component {12e63991-86ac-4dff-bb1a-703495d67d17} EditorUtils.js
contract @mozilla.org/editor-utils;1 {12e63991-86ac-4dff-bb1a-703495d67d17}

Просмотреть файл

@ -21,9 +21,9 @@
#include "nsICSSLoaderObserver.h"
#include "nsIDocumentObserver.h"
#include "nsIDOMEventListener.h"
#include "nsIEditorBlobListener.h"
#include "nsIEditorMailSupport.h"
#include "nsIEditorStyleSheets.h"
#include "nsIEditorUtils.h"
#include "nsIHTMLAbsPosEditor.h"
#include "nsIHTMLEditor.h"
#include "nsIHTMLInlineTableEditor.h"

Просмотреть файл

@ -89,11 +89,6 @@ LOCAL_INCLUDES += [
'/layout/xul',
]
EXTRA_COMPONENTS += [
'EditorUtils.js',
'EditorUtils.manifest',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -15,11 +15,11 @@ XPIDL_SOURCES += [
'nsIDocumentStateListener.idl',
'nsIEditActionListener.idl',
'nsIEditor.idl',
'nsIEditorBlobListener.idl',
'nsIEditorMailSupport.idl',
'nsIEditorObserver.idl',
'nsIEditorSpellCheck.idl',
'nsIEditorStyleSheets.idl',
'nsIEditorUtils.idl',
'nsIHTMLAbsPosEditor.idl',
'nsIHTMLEditor.idl',
'nsIHTMLInlineTableEditor.idl',

Просмотреть файл

@ -0,0 +1,14 @@
/* -*- Mode: C++; tab-width: 4; 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 "nsISupports.idl"
[builtinclass, uuid(eb8b8ad9-5d8f-43bd-8ce5-5b943c180d56)]
interface nsIEditorBlobListener : nsISupports
{
void onResult(in ACString aResult);
void onError(in AString aErrorName);
};

Просмотреть файл

@ -1,33 +0,0 @@
/* -*- Mode: C++; tab-width: 4; 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 "nsISupports.idl"
#include "domstubs.idl"
interface mozIDOMWindowProxy;
webidl Blob;
[scriptable, builtinclass, uuid(eb8b8ad9-5d8f-43bd-8ce5-5b943c180d56)]
interface nsIEditorBlobListener : nsISupports
{
void onResult(in ACString aResult);
void onError(in AString aErrorName);
};
/**
* A collection of utility functions that editors can use that are more easily
* done in JavaScript.
*/
[scriptable, uuid(4bf94928-575e-4bd1-8321-a2c4b3d0119e)]
interface nsIEditorUtils : nsISupports
{
/**
* Given a blob, returns the data from that blob, asynchronously.
*/
void slurpBlob(in Blob aBlob, in mozIDOMWindowProxy aScope,
in nsIEditorBlobListener aListener);
};

Просмотреть файл

@ -131,8 +131,6 @@
@BINPATH@/components/TooltipTextProvider.manifest
@BINPATH@/components/NetworkGeolocationProvider.manifest
@BINPATH@/components/NetworkGeolocationProvider.js
@BINPATH@/components/EditorUtils.manifest
@BINPATH@/components/EditorUtils.js
@BINPATH@/components/extensions.manifest
@BINPATH@/components/addonManager.js