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

Unified Diff: content/renderer/render_frame_impl.h

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: using UserData and adressing nasko comments Created 5 years, 3 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
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index baf0dbac86bc2abac093285b18a1846e8ac37d8b..31e532f6f4b815a5f418f0ac04f5030abccbe649 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -19,6 +19,7 @@
#include "content/common/frame_message_enums.h"
#include "content/common/mojo/service_registry_impl.h"
#include "content/public/common/console_message_level.h"
+#include "content/public/common/data_reduction_proxy_lofi_user_data.h"
#include "content/public/common/javascript_message_type.h"
#include "content/public/common/referrer.h"
#include "content/public/renderer/render_frame.h"
@@ -219,7 +220,7 @@ class CONTENT_EXPORT RenderFrameImpl
// This method must be called after the frame has been added to the frame
// tree. It creates all objects that depend on the frame being at its proper
// spot.
- void Initialize();
+ void Initialize(LoFiState lofi_state = LOFI_DEFAULT);
// Notifications from RenderWidget.
void WasHidden();
@@ -363,6 +364,7 @@ class CONTENT_EXPORT RenderFrameImpl
v8::Local<v8::Context> context) override;
void AddMessageToConsole(ConsoleMessageLevel level,
const std::string& message) override;
+ bool IsLoFiOn() override;
// blink::WebFrameClient implementation:
virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame,
@@ -1028,6 +1030,9 @@ class CONTENT_EXPORT RenderFrameImpl
scoped_ptr<blink::WebUSBClient> usb_client_;
+ // Whether or not to use Lo-Fi for this frame or let the browser decide.
+ LoFiState lofi_state_;
+
#if defined(ENABLE_WEBVR)
// The VR dispatcher attached to the frame, lazily initialized.
scoped_ptr<VRDispatcher> vr_dispatcher_;

Powered by Google App Engine
This is Rietveld 408576698