docshell/base/nsIGlobalHistory2.idl

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

mercurial