Source code

Revision control

Other Tools

1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#include "nsISupports.idl"
6
7
/**
8
* Allows to override about:newtab to point to a different location
9
* than the one specified within AboutRedirector.cpp
10
*/
11
12
[scriptable, uuid(dfcd2adc-7867-4d3a-ba70-17501f208142)]
13
interface nsIAboutNewTabService : nsISupports
14
{
15
/**
16
* Returns the url of the resource for the newtab page if not overridden,
17
* otherwise a string represenation of the new URL.
18
*/
19
attribute ACString newTabURL;
20
21
/**
22
* Returns the default URL (local or activity stream depending on pref)
23
*/
24
attribute ACString defaultURL;
25
26
/**
27
* Returns the about:welcome URL.
28
*/
29
attribute ACString welcomeURL;
30
31
/**
32
* Returns true if opening the New Tab page will notify the user of a change.
33
*/
34
attribute bool willNotifyUser;
35
36
/**
37
* Returns true if the default resource got overridden.
38
*/
39
readonly attribute bool overridden;
40
41
/**
42
* Returns true if the default resource is activity stream and isn't
43
* overridden
44
*/
45
readonly attribute bool activityStreamEnabled;
46
47
/**
48
* Returns true if the the debug pref for activity stream is true
49
*/
50
readonly attribute bool activityStreamDebug;
51
52
/**
53
* Resets to the default resource and also resets the
54
* overridden attribute to false.
55
*/
56
void resetNewTabURL();
57
58
/**
59
* Records a scalar metric for how long it takes to pain Top Sites, this will
60
* only record the first timestamp, all the subsequent calls will be ignored.
61
*/
62
void maybeRecordTopsitesPainted(in unsigned long long timestamp);
63
};