Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | /** |
michael@0 | 7 | * Provides information about global history to gecko. |
michael@0 | 8 | * |
michael@0 | 9 | * @note This interface replaces and deprecates nsIGlobalHistory. |
michael@0 | 10 | */ |
michael@0 | 11 | |
michael@0 | 12 | #include "nsISupports.idl" |
michael@0 | 13 | interface nsIURI; |
michael@0 | 14 | |
michael@0 | 15 | %{ C++ |
michael@0 | 16 | |
michael@0 | 17 | // nsIObserver topic to fire when you add new visited URIs to the history; |
michael@0 | 18 | // the nsIURI is the subject |
michael@0 | 19 | #define NS_LINK_VISITED_EVENT_TOPIC "link-visited" |
michael@0 | 20 | |
michael@0 | 21 | %} |
michael@0 | 22 | |
michael@0 | 23 | [scriptable, uuid(cf777d42-1270-4b34-be7b-2931c93feda5)] |
michael@0 | 24 | interface nsIGlobalHistory2 : nsISupports |
michael@0 | 25 | { |
michael@0 | 26 | /** |
michael@0 | 27 | * Add a URI to global history |
michael@0 | 28 | * |
michael@0 | 29 | * @param aURI the URI of the page |
michael@0 | 30 | * @param aRedirect whether the URI was redirected to another location; |
michael@0 | 31 | * this is 'true' for the original URI which is |
michael@0 | 32 | * redirected. |
michael@0 | 33 | * @param aToplevel whether the URI is loaded in a top-level window |
michael@0 | 34 | * @param aReferrer the URI of the referring page |
michael@0 | 35 | * |
michael@0 | 36 | * @note Docshell will not filter out URI schemes like chrome: data: |
michael@0 | 37 | * about: and view-source:. Embedders should consider filtering out |
michael@0 | 38 | * these schemes and others, e.g. mailbox: for the main URI and the |
michael@0 | 39 | * referrer. |
michael@0 | 40 | */ |
michael@0 | 41 | void addURI(in nsIURI aURI, in boolean aRedirect, in boolean aToplevel, in nsIURI aReferrer); |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * Checks to see whether the given URI is in history. |
michael@0 | 45 | * |
michael@0 | 46 | * @param aURI the uri to the page |
michael@0 | 47 | * @return true if a URI has been visited |
michael@0 | 48 | */ |
michael@0 | 49 | boolean isVisited(in nsIURI aURI); |
michael@0 | 50 | |
michael@0 | 51 | /** |
michael@0 | 52 | * Set the page title for the given uri. URIs that are not already in |
michael@0 | 53 | * global history will not be added. |
michael@0 | 54 | * |
michael@0 | 55 | * @param aURI the URI for which to set to the title |
michael@0 | 56 | * @param aTitle the page title |
michael@0 | 57 | */ |
michael@0 | 58 | void setPageTitle(in nsIURI aURI, in AString aTitle); |
michael@0 | 59 | }; |