/* 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/. */ const EXPORTED_SYMBOLS = [ "BookmarkHTMLUtils" ]; const Ci = Components.interfaces; const Cc = Components.classes; const Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource://gre/modules/PlacesUtils.jsm"); const Container_Normal = 0; const Container_Toolbar = 1; const Container_Menu = 2; const Container_Unfiled = 3; const Container_Places = 4; const RESTORE_BEGIN_NSIOBSERVER_TOPIC = "bookmarks-restore-begin"; const RESTORE_SUCCESS_NSIOBSERVER_TOPIC = "bookmarks-restore-success"; const RESTORE_FAILED_NSIOBSERVER_TOPIC = "bookmarks-restore-failed"; const RESTORE_NSIOBSERVER_DATA = "html"; const RESTORE_INITIAL_NSIOBSERVER_DATA = "html-initial"; const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar"; const DESCRIPTION_ANNO = "bookmarkProperties/description"; const POST_DATA_ANNO = "bookmarkProperties/POSTData"; let serialNumber = 0; // for favicons let BookmarkHTMLUtils = Object.freeze({ importFromURL: function importFromFile(aUrlString, aInitialImport, aCallback) { let importer = new BookmarkImporter(aInitialImport); importer.importFromURL(aUrlString, aCallback); }, importFromFile: function importFromFile(aLocalFile, aInitialImport, aCallback) { let importer = new BookmarkImporter(aInitialImport); importer.importFromFile(aLocalFile, aCallback); }, }); function Frame(aFrameId) { this.containerId = aFrameId; /** * How many
s have been nested. Each frame/container should start * with a heading, and is then followed by a
,