| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
tring& initiator, const String& charset, ResourceLoadPriority priority) | 33 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
tring& initiator, const String& charset, ResourceLoadPriority priority) |
| 34 : m_resourceRequest(resourceRequest) | 34 : m_resourceRequest(resourceRequest) |
| 35 , m_charset(charset) | 35 , m_charset(charset) |
| 36 , m_options(ResourceFetcher::defaultResourceOptions()) | 36 , m_options(ResourceFetcher::defaultResourceOptions()) |
| 37 , m_priority(priority) | 37 , m_priority(priority) |
| 38 , m_forPreload(false) | 38 , m_forPreload(false) |
| 39 , m_linkPreload(false) | 39 , m_linkPreload(false) |
| 40 , m_preloadDiscoveryTime(0.0) |
| 40 , m_defer(NoDefer) | 41 , m_defer(NoDefer) |
| 41 , m_originRestriction(UseDefaultOriginRestrictionForType) | 42 , m_originRestriction(UseDefaultOriginRestrictionForType) |
| 42 { | 43 { |
| 43 m_options.initiatorInfo.name = initiator; | 44 m_options.initiatorInfo.name = initiator; |
| 44 } | 45 } |
| 45 | 46 |
| 46 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
tring& initiator, const ResourceLoaderOptions& options) | 47 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
tring& initiator, const ResourceLoaderOptions& options) |
| 47 : m_resourceRequest(resourceRequest) | 48 : m_resourceRequest(resourceRequest) |
| 48 , m_options(options) | 49 , m_options(options) |
| 49 , m_priority(ResourceLoadPriorityUnresolved) | 50 , m_priority(ResourceLoadPriorityUnresolved) |
| 50 , m_forPreload(false) | 51 , m_forPreload(false) |
| 51 , m_linkPreload(false) | 52 , m_linkPreload(false) |
| 53 , m_preloadDiscoveryTime(0.0) |
| 52 , m_defer(NoDefer) | 54 , m_defer(NoDefer) |
| 53 , m_originRestriction(UseDefaultOriginRestrictionForType) | 55 , m_originRestriction(UseDefaultOriginRestrictionForType) |
| 54 { | 56 { |
| 55 m_options.initiatorInfo.name = initiator; | 57 m_options.initiatorInfo.name = initiator; |
| 56 } | 58 } |
| 57 | 59 |
| 58 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const FetchIn
itiatorInfo& initiator) | 60 FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const FetchIn
itiatorInfo& initiator) |
| 59 : m_resourceRequest(resourceRequest) | 61 : m_resourceRequest(resourceRequest) |
| 60 , m_options(ResourceFetcher::defaultResourceOptions()) | 62 , m_options(ResourceFetcher::defaultResourceOptions()) |
| 61 , m_priority(ResourceLoadPriorityUnresolved) | 63 , m_priority(ResourceLoadPriorityUnresolved) |
| 62 , m_forPreload(false) | 64 , m_forPreload(false) |
| 63 , m_linkPreload(false) | 65 , m_linkPreload(false) |
| 66 , m_preloadDiscoveryTime(0.0) |
| 64 , m_defer(NoDefer) | 67 , m_defer(NoDefer) |
| 65 , m_originRestriction(UseDefaultOriginRestrictionForType) | 68 , m_originRestriction(UseDefaultOriginRestrictionForType) |
| 66 { | 69 { |
| 67 m_options.initiatorInfo = initiator; | 70 m_options.initiatorInfo = initiator; |
| 68 } | 71 } |
| 69 | 72 |
| 70 FetchRequest::~FetchRequest() | 73 FetchRequest::~FetchRequest() |
| 71 { | 74 { |
| 72 } | 75 } |
| 73 | 76 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 91 | 94 |
| 92 | 95 |
| 93 void FetchRequest::setResourceWidth(ResourceWidth resourceWidth) | 96 void FetchRequest::setResourceWidth(ResourceWidth resourceWidth) |
| 94 { | 97 { |
| 95 if (resourceWidth.isSet) { | 98 if (resourceWidth.isSet) { |
| 96 m_resourceWidth.width = resourceWidth.width; | 99 m_resourceWidth.width = resourceWidth.width; |
| 97 m_resourceWidth.isSet = true; | 100 m_resourceWidth.isSet = true; |
| 98 } | 101 } |
| 99 } | 102 } |
| 100 | 103 |
| 104 void FetchRequest::setForPreload(bool forPreload, double discoveryTime) |
| 105 { |
| 106 m_forPreload = forPreload; |
| 107 m_preloadDiscoveryTime = discoveryTime; |
| 108 } |
| 109 |
| 101 } // namespace blink | 110 } // namespace blink |
| OLD | NEW |