Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIWebNavigation.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/docshell/base/nsIWebNavigation.idl
3
 */
4
5
#ifndef __gen_nsIWebNavigation_h__
6
#define __gen_nsIWebNavigation_h__
7
8
9
#ifndef __gen_nsISupports_h__
10
#include "nsISupports.h"
11
#endif
12
13
#include "js/Value.h"
14
15
#include "js/GCAnnotations.h"
16
17
/* For IDL files that don't want to include root IDL files. */
18
#ifndef NS_NO_VTABLE
19
#define NS_NO_VTABLE
20
#endif
21
class nsIInputStream; /* forward declaration */
22
23
class nsISHistory; /* forward declaration */
24
25
class nsIURI; /* forward declaration */
26
27
class nsIPrincipal; /* forward declaration */
28
29
class nsIChildSHistory; /* forward declaration */
30
31
class nsIDocument; /* webidl Document */
32
33
#include "mozilla/dom/ChildSHistory.h"
34
35
/* starting interface:    nsIWebNavigation */
36
#define NS_IWEBNAVIGATION_IID_STR "3ade79d4-8cb9-4952-b18d-4f9b63ca0d31"
37
38
#define NS_IWEBNAVIGATION_IID \
39
  {0x3ade79d4, 0x8cb9, 0x4952, \
40
    { 0xb1, 0x8d, 0x4f, 0x9b, 0x63, 0xca, 0x0d, 0x31 }}
41
42
class nsIWebNavigation : public nsISupports {
43
 public:
44
45
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBNAVIGATION_IID)
46
47
  /* readonly attribute boolean canGoBack; */
48
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCanGoBack(bool *aCanGoBack) = 0;
49
50
  /* readonly attribute boolean canGoForward; */
51
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCanGoForward(bool *aCanGoForward) = 0;
52
53
  /* void goBack (); */
54
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GoBack(void) = 0;
55
56
  /* void goForward (); */
57
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GoForward(void) = 0;
58
59
  /* void gotoIndex (in long index); */
60
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GotoIndex(int32_t index) = 0;
61
62
  enum {
63
    LOAD_FLAGS_MASK = 65535U,
64
    LOAD_FLAGS_NONE = 0U,
65
    LOAD_FLAGS_IS_REFRESH = 16U,
66
    LOAD_FLAGS_IS_LINK = 32U,
67
    LOAD_FLAGS_BYPASS_HISTORY = 64U,
68
    LOAD_FLAGS_REPLACE_HISTORY = 128U,
69
    LOAD_FLAGS_BYPASS_CACHE = 256U,
70
    LOAD_FLAGS_BYPASS_PROXY = 512U,
71
    LOAD_FLAGS_CHARSET_CHANGE = 1024U,
72
    LOAD_FLAGS_STOP_CONTENT = 2048U,
73
    LOAD_FLAGS_FROM_EXTERNAL = 4096U,
74
    LOAD_FLAGS_ALLOW_MIXED_CONTENT = 8192U,
75
    LOAD_FLAGS_FIRST_LOAD = 16384U,
76
    LOAD_FLAGS_ALLOW_POPUPS = 32768U,
77
    LOAD_FLAGS_BYPASS_CLASSIFIER = 65536U,
78
    LOAD_FLAGS_FORCE_ALLOW_COOKIES = 131072U,
79
    LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL = 262144U,
80
    LOAD_FLAGS_ERROR_LOAD_CHANGES_RV = 524288U,
81
    LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 1048576U,
82
    LOAD_FLAGS_FIXUP_SCHEME_TYPOS = 2097152U,
83
    LOAD_FLAGS_FORCE_ALLOW_DATA_URI = 4194304U
84
  };
85
86
  /* void loadURI (in AString aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders, [optional] in nsIPrincipal aTriggeringPrincipal); */
87
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LoadURI(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIPrincipal *aTriggeringPrincipal) = 0;
88
89
  /* void loadURIWithOptions (in AString aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in nsIInputStream aHeaders, in nsIURI aBaseURI, [optional] in nsIPrincipal aTriggeringPrincipal); */
90
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LoadURIWithOptions(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIURI *aBaseURI, nsIPrincipal *aTriggeringPrincipal) = 0;
91
92
  /* void reload (in unsigned long aReloadFlags); */
93
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Reload(uint32_t aReloadFlags) = 0;
94
95
  enum {
96
    STOP_NETWORK = 1U,
97
    STOP_CONTENT = 2U,
98
    STOP_ALL = 3U
99
  };
100
101
  /* void stop (in unsigned long aStopFlags); */
102
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Stop(uint32_t aStopFlags) = 0;
103
104
  /* readonly attribute Document document; */
105
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDocument(nsIDocument **aDocument) = 0;
106
107
  /* readonly attribute nsIURI currentURI; */
108
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCurrentURI(nsIURI **aCurrentURI) = 0;
109
110
  /* readonly attribute nsIURI referringURI; */
111
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetReferringURI(nsIURI **aReferringURI) = 0;
112
113
  /* [binaryname(SessionHistoryXPCOM)] readonly attribute nsISupports sessionHistory; */
114
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSessionHistoryXPCOM(nsISupports **aSessionHistory) = 0;
115
116
   /**
117
   * Get the session history object used by this nsIWebNavigation instance.
118
   * Use this method instead of the XPCOM method when getting the
119
   * SessionHistory from C++ code.
120
   */
121
  already_AddRefed<mozilla::dom::ChildSHistory>
122
  GetSessionHistory()
123
0
  {
124
0
    nsCOMPtr<nsISupports> history;
125
0
    GetSessionHistoryXPCOM(getter_AddRefs(history));
126
0
    return history.forget()
127
0
      .downcast<mozilla::dom::ChildSHistory>();
128
0
  }
129
    /* [implicit_jscontext] void setOriginAttributesBeforeLoading (in jsval originAttributes); */
130
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetOriginAttributesBeforeLoading(JS::HandleValue originAttributes, JSContext* cx) = 0;
131
132
};
133
134
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebNavigation, NS_IWEBNAVIGATION_IID)
135
136
/* Use this macro when declaring classes that implement this interface. */
137
#define NS_DECL_NSIWEBNAVIGATION \
138
  NS_IMETHOD GetCanGoBack(bool *aCanGoBack) override; \
139
  NS_IMETHOD GetCanGoForward(bool *aCanGoForward) override; \
140
  NS_IMETHOD GoBack(void) override; \
141
  NS_IMETHOD GoForward(void) override; \
142
  NS_IMETHOD GotoIndex(int32_t index) override; \
143
  NS_IMETHOD LoadURI(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIPrincipal *aTriggeringPrincipal) override; \
144
  NS_IMETHOD LoadURIWithOptions(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIURI *aBaseURI, nsIPrincipal *aTriggeringPrincipal) override; \
145
  NS_IMETHOD Reload(uint32_t aReloadFlags) override; \
146
  NS_IMETHOD Stop(uint32_t aStopFlags) override; \
147
  NS_IMETHOD GetDocument(nsIDocument **aDocument) override; \
148
  NS_IMETHOD GetCurrentURI(nsIURI **aCurrentURI) override; \
149
  NS_IMETHOD GetReferringURI(nsIURI **aReferringURI) override; \
150
  NS_IMETHOD GetSessionHistoryXPCOM(nsISupports **aSessionHistory) override; \
151
  NS_IMETHOD SetOriginAttributesBeforeLoading(JS::HandleValue originAttributes, JSContext* cx) override; 
152
153
/* Use this macro when declaring the members of this interface when the
154
   class doesn't implement the interface. This is useful for forwarding. */
155
#define NS_DECL_NON_VIRTUAL_NSIWEBNAVIGATION \
156
  nsresult GetCanGoBack(bool *aCanGoBack); \
157
  nsresult GetCanGoForward(bool *aCanGoForward); \
158
  nsresult GoBack(void); \
159
  nsresult GoForward(void); \
160
  nsresult GotoIndex(int32_t index); \
161
  nsresult LoadURI(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIPrincipal *aTriggeringPrincipal); \
162
  nsresult LoadURIWithOptions(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIURI *aBaseURI, nsIPrincipal *aTriggeringPrincipal); \
163
  nsresult Reload(uint32_t aReloadFlags); \
164
  nsresult Stop(uint32_t aStopFlags); \
165
  nsresult GetDocument(nsIDocument **aDocument); \
166
  nsresult GetCurrentURI(nsIURI **aCurrentURI); \
167
  nsresult GetReferringURI(nsIURI **aReferringURI); \
168
  nsresult GetSessionHistoryXPCOM(nsISupports **aSessionHistory); \
169
  nsresult SetOriginAttributesBeforeLoading(JS::HandleValue originAttributes, JSContext* cx); 
170
171
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
172
#define NS_FORWARD_NSIWEBNAVIGATION(_to) \
173
  NS_IMETHOD GetCanGoBack(bool *aCanGoBack) override { return _to GetCanGoBack(aCanGoBack); } \
174
  NS_IMETHOD GetCanGoForward(bool *aCanGoForward) override { return _to GetCanGoForward(aCanGoForward); } \
175
  NS_IMETHOD GoBack(void) override { return _to GoBack(); } \
176
  NS_IMETHOD GoForward(void) override { return _to GoForward(); } \
177
  NS_IMETHOD GotoIndex(int32_t index) override { return _to GotoIndex(index); } \
178
  NS_IMETHOD LoadURI(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIPrincipal *aTriggeringPrincipal) override { return _to LoadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders, aTriggeringPrincipal); } \
179
  NS_IMETHOD LoadURIWithOptions(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIURI *aBaseURI, nsIPrincipal *aTriggeringPrincipal) override { return _to LoadURIWithOptions(aURI, aLoadFlags, aReferrer, aReferrerPolicy, aPostData, aHeaders, aBaseURI, aTriggeringPrincipal); } \
180
  NS_IMETHOD Reload(uint32_t aReloadFlags) override { return _to Reload(aReloadFlags); } \
181
  NS_IMETHOD Stop(uint32_t aStopFlags) override { return _to Stop(aStopFlags); } \
182
  NS_IMETHOD GetDocument(nsIDocument **aDocument) override { return _to GetDocument(aDocument); } \
183
  NS_IMETHOD GetCurrentURI(nsIURI **aCurrentURI) override { return _to GetCurrentURI(aCurrentURI); } \
184
  NS_IMETHOD GetReferringURI(nsIURI **aReferringURI) override { return _to GetReferringURI(aReferringURI); } \
185
  NS_IMETHOD GetSessionHistoryXPCOM(nsISupports **aSessionHistory) override { return _to GetSessionHistoryXPCOM(aSessionHistory); } \
186
  NS_IMETHOD SetOriginAttributesBeforeLoading(JS::HandleValue originAttributes, JSContext* cx) override { return _to SetOriginAttributesBeforeLoading(originAttributes, cx); } 
187
188
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
189
#define NS_FORWARD_SAFE_NSIWEBNAVIGATION(_to) \
190
0
  NS_IMETHOD GetCanGoBack(bool *aCanGoBack) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanGoBack(aCanGoBack); } \
191
0
  NS_IMETHOD GetCanGoForward(bool *aCanGoForward) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanGoForward(aCanGoForward); } \
192
0
  NS_IMETHOD GoBack(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GoBack(); } \
193
0
  NS_IMETHOD GoForward(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GoForward(); } \
194
0
  NS_IMETHOD GotoIndex(int32_t index) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GotoIndex(index); } \
195
0
  NS_IMETHOD LoadURI(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIPrincipal *aTriggeringPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders, aTriggeringPrincipal); } \
196
0
  NS_IMETHOD LoadURIWithOptions(const nsAString& aURI, uint32_t aLoadFlags, nsIURI *aReferrer, uint32_t aReferrerPolicy, nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIURI *aBaseURI, nsIPrincipal *aTriggeringPrincipal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURIWithOptions(aURI, aLoadFlags, aReferrer, aReferrerPolicy, aPostData, aHeaders, aBaseURI, aTriggeringPrincipal); } \
197
0
  NS_IMETHOD Reload(uint32_t aReloadFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reload(aReloadFlags); } \
198
0
  NS_IMETHOD Stop(uint32_t aStopFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(aStopFlags); } \
199
0
  NS_IMETHOD GetDocument(nsIDocument **aDocument) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
200
0
  NS_IMETHOD GetCurrentURI(nsIURI **aCurrentURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentURI(aCurrentURI); } \
201
0
  NS_IMETHOD GetReferringURI(nsIURI **aReferringURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferringURI(aReferringURI); } \
202
0
  NS_IMETHOD GetSessionHistoryXPCOM(nsISupports **aSessionHistory) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSessionHistoryXPCOM(aSessionHistory); } \
203
0
  NS_IMETHOD SetOriginAttributesBeforeLoading(JS::HandleValue originAttributes, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOriginAttributesBeforeLoading(originAttributes, cx); } 
204
205
206
#endif /* __gen_nsIWebNavigation_h__ */