Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: content/public/common/previews_state.h

Issue 2910783002: Adds Lo-Fi fallback support for new Data Reduction Proxy protocol. (Closed)
Patch Set: Renamed helper method from Update* to Get* Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_PREVIEWS_TYPE_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_PREVIEWS_TYPE_H_
6 #define CONTENT_PUBLIC_COMMON_PREVIEWS_TYPE_H_ 6 #define CONTENT_PUBLIC_COMMON_PREVIEWS_TYPE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/platform/WebURLRequest.h" 9 #include "third_party/WebKit/public/platform/WebURLRequest.h"
10 10
11 #define STATIC_ASSERT_PREVIEWS_ENUM(a, b) \ 11 #define STATIC_ASSERT_PREVIEWS_ENUM(a, b) \
12 static_assert(static_cast<int>(a) == static_cast<int>(b), \ 12 static_assert(static_cast<int>(a) == static_cast<int>(b), \
13 "mismatching enums: " #a) 13 "mismatching enums: " #a)
14 14
15 namespace content { 15 namespace content {
16 16
17 // Chrome Proxy Previews header and directives.
18 const char kChromeProxyContentTransformHeader[] =
19 "chrome-proxy-content-transform";
20 const char kChromeProxyEmptyImageDirective[] = "empty-image";
21 const char kChromeProxyLitePageDirective[] = "lite-page";
22
23 typedef int PreviewsState; 17 typedef int PreviewsState;
24 18
25 // The Previews types which determines whether to request a Preview version of 19 // The Previews types which determines whether to request a Preview version of
26 // the resource. Previews are optimizations that change the format and 20 // the resource. Previews are optimizations that change the format and
27 // content of web pages to improve data savings and / or performance. This enum 21 // content of web pages to improve data savings and / or performance. This enum
28 // determines which Previews types to request. 22 // determines which Previews types to request.
29 enum PreviewsTypes { 23 enum PreviewsTypes {
30 PREVIEWS_UNSPECIFIED = 0, // Let the browser process decide whether or 24 PREVIEWS_UNSPECIFIED = 0, // Let the browser process decide whether or
31 // not to request Preview types. 25 // not to request Preview types.
32 SERVER_LOFI_ON = 1 << 0, // Request a Lo-Fi version of the resource 26 SERVER_LOFI_ON = 1 << 0, // Request a Lo-Fi version of the resource
(...skipping 27 matching lines...) Expand all
60 blink::WebURLRequest::kServerLitePageOn); 54 blink::WebURLRequest::kServerLitePageOn);
61 STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_NO_TRANSFORM, 55 STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_NO_TRANSFORM,
62 blink::WebURLRequest::kPreviewsNoTransform); 56 blink::WebURLRequest::kPreviewsNoTransform);
63 STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_OFF, blink::WebURLRequest::kPreviewsOff); 57 STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_OFF, blink::WebURLRequest::kPreviewsOff);
64 STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_STATE_LAST, 58 STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_STATE_LAST,
65 blink::WebURLRequest::kPreviewsStateLast); 59 blink::WebURLRequest::kPreviewsStateLast);
66 60
67 } // namespace content 61 } // namespace content
68 62
69 #endif // CONTENT_PUBLIC_COMMON_PREVIEWS_TYPE_H_ 63 #endif // CONTENT_PUBLIC_COMMON_PREVIEWS_TYPE_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698