OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 | 175 |
176 // The client should handle the navigation externally. | 176 // The client should handle the navigation externally. |
177 virtual void loadURLExternally( | 177 virtual void loadURLExternally( |
178 WebLocalFrame*, const WebURLRequest&, WebNavigationPolicy, const WebStri ng& downloadName) { } | 178 WebLocalFrame*, const WebURLRequest&, WebNavigationPolicy, const WebStri ng& downloadName) { } |
179 | 179 |
180 | 180 |
181 // Navigational queries ------------------------------------------------ | 181 // Navigational queries ------------------------------------------------ |
182 | 182 |
183 // The client may choose to alter the navigation policy. Otherwise, | 183 // The client may choose to alter the navigation policy. Otherwise, |
184 // defaultPolicy should just be returned. | 184 // defaultPolicy should just be returned. |
185 | |
186 struct NavigationPolicyInfo { | |
187 WebLocalFrame* frame; | |
188 WebDataSource::ExtraData* extraData; | |
189 const WebURLRequest& urlRequest; | |
190 WebNavigationType navigationType; | |
191 WebNavigationPolicy defaultPolicy; | |
192 bool isRedirect; | |
193 bool isTransitionNavigation; | |
194 NavigationPolicyInfo(const WebURLRequest& urlRequest) : frame(0), extraD ata(0), urlRequest(urlRequest), navigationType(WebNavigationTypeOther), defaultP olicy(WebNavigationPolicyIgnore), isRedirect(false), isTransitionNavigation(fals e) { } | |
esprehn
2014/06/21 02:50:21
This should have each member on it's own line, and
| |
195 }; | |
196 virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicy Info& info) | |
esprehn
2014/06/21 02:50:21
add a new line before this
| |
197 { | |
198 return decidePolicyForNavigation(info.frame, info.extraData, info.urlReq uest, info.navigationType, info.defaultPolicy, info.isRedirect); | |
199 } | |
200 | |
201 // DEPRECATED | |
185 virtual WebNavigationPolicy decidePolicyForNavigation( | 202 virtual WebNavigationPolicy decidePolicyForNavigation( |
186 WebLocalFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavi gationType, | 203 WebLocalFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavi gationType, |
187 WebNavigationPolicy defaultPolicy, bool isRedirect) { return defaultPoli cy; } | 204 WebNavigationPolicy defaultPolicy, bool isRedirect) { return defaultPoli cy; } |
188 | 205 |
189 // During a history navigation, we may choose to load new subframes from his tory as well. | 206 // During a history navigation, we may choose to load new subframes from his tory as well. |
190 // This returns such a history item if appropriate. | 207 // This returns such a history item if appropriate. |
191 virtual WebHistoryItem historyItemForNewChildFrame(WebFrame*) { return WebHi storyItem(); } | 208 virtual WebHistoryItem historyItemForNewChildFrame(WebFrame*) { return WebHi storyItem(); } |
192 | 209 |
193 | 210 |
194 // Navigational notifications ------------------------------------------ | 211 // Navigational notifications ------------------------------------------ |
(...skipping 12 matching lines...) Expand all Loading... | |
207 virtual void willSendSubmitEvent(WebLocalFrame*, const WebFormElement&) { } | 224 virtual void willSendSubmitEvent(WebLocalFrame*, const WebFormElement&) { } |
208 | 225 |
209 // A form submission is about to occur. | 226 // A form submission is about to occur. |
210 virtual void willSubmitForm(WebLocalFrame*, const WebFormElement&) { } | 227 virtual void willSubmitForm(WebLocalFrame*, const WebFormElement&) { } |
211 | 228 |
212 // A datasource has been created for a new navigation. The given | 229 // A datasource has been created for a new navigation. The given |
213 // datasource will become the provisional datasource for the frame. | 230 // datasource will become the provisional datasource for the frame. |
214 virtual void didCreateDataSource(WebLocalFrame*, WebDataSource*) { } | 231 virtual void didCreateDataSource(WebLocalFrame*, WebDataSource*) { } |
215 | 232 |
216 // A new provisional load has been started. | 233 // A new provisional load has been started. |
234 virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTrans itionNavigation) { didStartProvisionalLoad(localFrame); } | |
235 // DEPRECATED | |
217 virtual void didStartProvisionalLoad(WebLocalFrame*) { } | 236 virtual void didStartProvisionalLoad(WebLocalFrame*) { } |
218 | 237 |
219 // The provisional load was redirected via a HTTP 3xx response. | 238 // The provisional load was redirected via a HTTP 3xx response. |
220 virtual void didReceiveServerRedirectForProvisionalLoad(WebLocalFrame*) { } | 239 virtual void didReceiveServerRedirectForProvisionalLoad(WebLocalFrame*) { } |
221 | 240 |
222 // The provisional load failed. | 241 // The provisional load failed. |
223 virtual void didFailProvisionalLoad(WebLocalFrame*, const WebURLError&) { } | 242 virtual void didFailProvisionalLoad(WebLocalFrame*, const WebURLError&) { } |
224 | 243 |
225 // The provisional datasource is now committed. The first part of the | 244 // The provisional datasource is now committed. The first part of the |
226 // response body has been received, and the encoding of the response | 245 // response body has been received, and the encoding of the response |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 // WARNING: This method may be called very frequently. | 282 // WARNING: This method may be called very frequently. |
264 virtual void didUpdateCurrentHistoryItem(WebLocalFrame*) { } | 283 virtual void didUpdateCurrentHistoryItem(WebLocalFrame*) { } |
265 | 284 |
266 // The frame's manifest has changed. | 285 // The frame's manifest has changed. |
267 virtual void didChangeManifest(WebLocalFrame*) { } | 286 virtual void didChangeManifest(WebLocalFrame*) { } |
268 | 287 |
269 // The frame's brand color has changed. | 288 // The frame's brand color has changed. |
270 virtual void didChangeBrandColor(WebLocalFrame*) { } | 289 virtual void didChangeBrandColor(WebLocalFrame*) { } |
271 | 290 |
272 | 291 |
292 // Transition navigations ----------------------------------------------- | |
293 | |
294 // Provides serialized markup of transition elements for use in the followin g navigation. | |
295 virtual void addNavigationTransitionData(const WebString& allowedDestination Origin, const WebString& markup) { } | |
296 | |
297 | |
273 // Misc ---------------------------------------------------------------- | 298 // Misc ---------------------------------------------------------------- |
274 | 299 |
275 // Called to retrieve the provider of desktop notifications. | 300 // Called to retrieve the provider of desktop notifications. |
276 virtual WebNotificationPresenter* notificationPresenter() { return 0; } | 301 virtual WebNotificationPresenter* notificationPresenter() { return 0; } |
277 | 302 |
278 | 303 |
279 // Editing ------------------------------------------------------------- | 304 // Editing ------------------------------------------------------------- |
280 | 305 |
281 // These methods allow the client to intercept and overrule editing | 306 // These methods allow the client to intercept and overrule editing |
282 // operations. | 307 // operations. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
518 // Access the embedder API for (client-based) screen orientation client . | 543 // Access the embedder API for (client-based) screen orientation client . |
519 virtual WebScreenOrientationClient* webScreenOrientationClient() { return 0; } | 544 virtual WebScreenOrientationClient* webScreenOrientationClient() { return 0; } |
520 | 545 |
521 protected: | 546 protected: |
522 virtual ~WebFrameClient() { } | 547 virtual ~WebFrameClient() { } |
523 }; | 548 }; |
524 | 549 |
525 } // namespace blink | 550 } // namespace blink |
526 | 551 |
527 #endif | 552 #endif |
OLD | NEW |