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

Unified Diff: content/public/common/previews_state.h

Issue 2642793005: Create a Lite Page bit for previews and fallback to Lo-Fi (Closed)
Patch Set: remove unused frame_messages.h code Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/previews_state.h
diff --git a/content/public/common/previews_state.h b/content/public/common/previews_state.h
index 5c88744894e7c9ed5bfa8b80566bd0004742a5d5..875ca98e2b27156ed3fe37e820687e298e6581be 100644
--- a/content/public/common/previews_state.h
+++ b/content/public/common/previews_state.h
@@ -14,20 +14,30 @@
namespace content {
-// The Previews state which determines whether to request a Preview version of
+// Chrome Proxy Previews header and directives.
+const char kChromeProxyContentTransformHeader[] =
+ "chrome-proxy-content-transform";
+const char kChromeProxyEmptyImageDirective[] = "empty-image";
+const char kChromeProxyLitePageDirective[] = "lite-page";
+
+typedef int PreviewsState;
+
+// The Previews types which determines whether to request a Preview version of
// the resource. Previews are optimizations that change the format and
// content of web pages to improve data savings and / or performance. This enum
// determines which Previews types to request.
-enum PreviewsState {
+enum PreviewsTypes {
PREVIEWS_UNSPECIFIED = 0, // Let the browser process decide whether or
// not to request Preview types.
SERVER_LOFI_ON = 1 << 0, // Request a Lo-Fi version of the resource
// from the server.
CLIENT_LOFI_ON = 1 << 1, // Request a Lo-Fi version of the resource
// from the client.
- PREVIEWS_NO_TRANSFORM = 1 << 2, // Explicitly forbid Previews
+ SERVER_LITE_PAGE_ON = 1 << 2, // Request a Lite Page version of the
+ // resource from the server.
+ PREVIEWS_NO_TRANSFORM = 1 << 3, // Explicitly forbid Previews
// transformations.
- PREVIEWS_OFF = 1 << 3, // Request a normal (non-Preview) version of
+ PREVIEWS_OFF = 1 << 4, // Request a normal (non-Preview) version of
// the resource. Server transformations may
// still happen if the page is heavy.
PREVIEWS_STATE_LAST = PREVIEWS_OFF
@@ -39,6 +49,8 @@ STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_UNSPECIFIED,
blink::WebURLRequest::PreviewsUnspecified);
STATIC_ASSERT_PREVIEWS_ENUM(SERVER_LOFI_ON, blink::WebURLRequest::ServerLoFiOn);
STATIC_ASSERT_PREVIEWS_ENUM(CLIENT_LOFI_ON, blink::WebURLRequest::ClientLoFiOn);
+STATIC_ASSERT_PREVIEWS_ENUM(SERVER_LITE_PAGE_ON,
+ blink::WebURLRequest::ServerLitePageOn);
STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_NO_TRANSFORM,
blink::WebURLRequest::PreviewsNoTransform);
STATIC_ASSERT_PREVIEWS_ENUM(PREVIEWS_OFF, blink::WebURLRequest::PreviewsOff);
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698