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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
293 // should stop in blink. In all other cases, the urlRequest should not | 293 // should stop in blink. In all other cases, the urlRequest should not |
294 // be modified. | 294 // be modified. |
295 WebURLRequest& urlRequest; | 295 WebURLRequest& urlRequest; |
296 WebNavigationType navigationType; | 296 WebNavigationType navigationType; |
297 WebNavigationPolicy defaultPolicy; | 297 WebNavigationPolicy defaultPolicy; |
298 bool replacesCurrentHistoryItem; | 298 bool replacesCurrentHistoryItem; |
299 bool isHistoryNavigationInNewChildFrame; | 299 bool isHistoryNavigationInNewChildFrame; |
300 bool isClientRedirect; | 300 bool isClientRedirect; |
301 WebFormElement form; | 301 WebFormElement form; |
302 bool isCacheDisabled; | 302 bool isCacheDisabled; |
303 bool shouldBypassMainWorldCSP; | |
dcheng
2017/03/16 08:34:47
I would encourage the use of an enum for this (and
arthursonzogni
2017/03/16 15:47:36
By seeing all of these booleans, I thought that I
| |
303 | 304 |
304 NavigationPolicyInfo(WebURLRequest& urlRequest) | 305 NavigationPolicyInfo(WebURLRequest& urlRequest) |
305 : extraData(nullptr), | 306 : extraData(nullptr), |
306 urlRequest(urlRequest), | 307 urlRequest(urlRequest), |
307 navigationType(WebNavigationTypeOther), | 308 navigationType(WebNavigationTypeOther), |
308 defaultPolicy(WebNavigationPolicyIgnore), | 309 defaultPolicy(WebNavigationPolicyIgnore), |
309 replacesCurrentHistoryItem(false), | 310 replacesCurrentHistoryItem(false), |
310 isHistoryNavigationInNewChildFrame(false), | 311 isHistoryNavigationInNewChildFrame(false), |
311 isClientRedirect(false), | 312 isClientRedirect(false), |
312 isCacheDisabled(false) {} | 313 isCacheDisabled(false), |
314 shouldBypassMainWorldCSP(false) {} | |
313 }; | 315 }; |
314 | 316 |
315 virtual WebNavigationPolicy decidePolicyForNavigation( | 317 virtual WebNavigationPolicy decidePolicyForNavigation( |
316 const NavigationPolicyInfo& info) { | 318 const NavigationPolicyInfo& info) { |
317 return info.defaultPolicy; | 319 return info.defaultPolicy; |
318 } | 320 } |
319 | 321 |
320 // During a history navigation, we may choose to load new subframes from | 322 // During a history navigation, we may choose to load new subframes from |
321 // history as well. This returns such a history item if appropriate. | 323 // history as well. This returns such a history item if appropriate. |
322 virtual WebHistoryItem historyItemForNewChildFrame() { | 324 virtual WebHistoryItem historyItemForNewChildFrame() { |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
745 // Overwrites the given URL to use an HTML5 embed if possible. | 747 // Overwrites the given URL to use an HTML5 embed if possible. |
746 // An empty URL is returned if the URL is not overriden. | 748 // An empty URL is returned if the URL is not overriden. |
747 virtual WebURL overrideFlashEmbedWithHTML(const WebURL& url) { | 749 virtual WebURL overrideFlashEmbedWithHTML(const WebURL& url) { |
748 return WebURL(); | 750 return WebURL(); |
749 } | 751 } |
750 }; | 752 }; |
751 | 753 |
752 } // namespace blink | 754 } // namespace blink |
753 | 755 |
754 #endif | 756 #endif |
OLD | NEW |