Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 | 129 |
| 130 // Used to report performance metrics timed from the UI action that | 130 // Used to report performance metrics timed from the UI action that |
| 131 // triggered them (as opposed to navigation start time used in the | 131 // triggered them (as opposed to navigation start time used in the |
| 132 // Navigation Timing API). | 132 // Navigation Timing API). |
| 133 enum InputToLoadPerfMetricReportPolicy { | 133 enum InputToLoadPerfMetricReportPolicy { |
| 134 NoReport, // Don't report metrics for this WebURLRequest. | 134 NoReport, // Don't report metrics for this WebURLRequest. |
| 135 ReportLink, // Report metrics with UI action link clicked. | 135 ReportLink, // Report metrics with UI action link clicked. |
| 136 ReportIntent, // Report metrics with UI action displayed intent. | 136 ReportIntent, // Report metrics with UI action displayed intent. |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 // The LoFi state which determines whether to request a Lo-Fi version of the | 139 // The Previews state which determines whether to request a Preview version of |
| 140 // resource. | 140 // the resource. A value of zero for Previews state means to let the browser |
| 141 enum LoFiState { | 141 // process decide whether or not to request Preview types. |
| 142 LoFiUnspecified, // Let the browser process decide whether or not to | 142 enum PreviewsState { |
|
RyanSturm
2016/12/06 19:39:30
maybe nit: I can't find anything in the style guid
megjablon
2016/12/06 21:23:47
I see this done elsewhere throughout the code, so
| |
| 143 // request the Lo-Fi version. | 143 ServerLoFiOn = 1 << 0, // Request a Lo-Fi version of the resource |
| 144 LoFiOff, // Request a normal (non-Lo-Fi) version of the resource. | 144 // from the server. |
| 145 LoFiOn, // Request a Lo-Fi version of the resource. | 145 ClientLoFiOn = 1 << 1, // Request a Lo-Fi version of the resource |
| 146 // from the client. | |
| 147 PreviewsOff = 1 << 2 // Request a normal (non-Preview) version of | |
| 148 // the resource. | |
| 146 }; | 149 }; |
| 147 | 150 |
| 148 // Indicates which types of ServiceWorkers should skip handling this request. | 151 // Indicates which types of ServiceWorkers should skip handling this request. |
| 149 enum class SkipServiceWorker { | 152 enum class SkipServiceWorker { |
| 150 // Request can be handled both by a controlling same-origin worker and | 153 // Request can be handled both by a controlling same-origin worker and |
| 151 // a cross-origin foreign fetch service worker. | 154 // a cross-origin foreign fetch service worker. |
| 152 None, | 155 None, |
| 153 // Request should not be handled by a same-origin controlling worker, | 156 // Request should not be handled by a same-origin controlling worker, |
| 154 // but can be intercepted by a foreign fetch service worker. | 157 // but can be intercepted by a foreign fetch service worker. |
| 155 Controlling, | 158 Controlling, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 278 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); | 281 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); |
| 279 | 282 |
| 280 // The credentials mode which will be passed to the ServiceWorker. | 283 // The credentials mode which will be passed to the ServiceWorker. |
| 281 BLINK_PLATFORM_EXPORT FetchCredentialsMode getFetchCredentialsMode() const; | 284 BLINK_PLATFORM_EXPORT FetchCredentialsMode getFetchCredentialsMode() const; |
| 282 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); | 285 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); |
| 283 | 286 |
| 284 // The redirect mode which is used in Fetch API. | 287 // The redirect mode which is used in Fetch API. |
| 285 BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const; | 288 BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const; |
| 286 BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode); | 289 BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode); |
| 287 | 290 |
| 288 // The LoFi state which determines whether to request a Lo-Fi version of the | 291 // The Previews state which determines whether to request a Preview version of |
| 289 // resource. | 292 // the resource. |
| 290 BLINK_PLATFORM_EXPORT LoFiState getLoFiState() const; | 293 BLINK_PLATFORM_EXPORT int getPreviewsState() const; |
| 291 BLINK_PLATFORM_EXPORT void setLoFiState(LoFiState); | 294 BLINK_PLATFORM_EXPORT void setPreviewsState(int); |
| 292 | 295 |
| 293 // Extra data associated with the underlying resource request. Resource | 296 // Extra data associated with the underlying resource request. Resource |
| 294 // requests can be copied. If non-null, each copy of a resource requests | 297 // requests can be copied. If non-null, each copy of a resource requests |
| 295 // holds a pointer to the extra data, and the extra data pointer will be | 298 // holds a pointer to the extra data, and the extra data pointer will be |
| 296 // deleted when the last resource request is destroyed. Setting the extra | 299 // deleted when the last resource request is destroyed. Setting the extra |
| 297 // data pointer will cause the underlying resource request to be | 300 // data pointer will cause the underlying resource request to be |
| 298 // dissociated from any existing non-null extra data pointer. | 301 // dissociated from any existing non-null extra data pointer. |
| 299 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; | 302 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; |
| 300 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 303 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 301 | 304 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 344 // instance it contains. | 347 // instance it contains. |
| 345 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; | 348 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; |
| 346 | 349 |
| 347 // Should never be null. | 350 // Should never be null. |
| 348 ResourceRequest* m_resourceRequest; | 351 ResourceRequest* m_resourceRequest; |
| 349 }; | 352 }; |
| 350 | 353 |
| 351 } // namespace blink | 354 } // namespace blink |
| 352 | 355 |
| 353 #endif | 356 #endif |
| OLD | NEW |