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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 5 years, 4 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_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index cdb56e533a78b10b12a1ad1dca3704399a510418..13216f005fb18e56d8e1b60d62b4115bf7bc499c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -37,6 +37,7 @@
#include "content/child/request_extra_data.h"
#include "content/child/v8_value_converter_impl.h"
#include "content/child/webmessageportchannel_impl.h"
+#include "content/child/weburlresponse_extradata_impl.h"
#include "content/common/content_constants_internal.h"
#include "content/common/database_messages.h"
#include "content/common/dom_storage/dom_storage_types.h"
@@ -45,6 +46,7 @@
#include "content/common/frame_replication_state.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/input_messages.h"
+#include "content/common/navigation_params.h"
#include "content/common/pepper_messages.h"
#include "content/common/site_isolation_policy.h"
#include "content/common/ssl_status_serialization.h"
@@ -712,7 +714,7 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params,
}
if (main_render_frame_)
- main_render_frame_->Initialize();
+ main_render_frame_->Initialize(LOFI_DEFAULT);
#if defined(OS_ANDROID)
content_detectors_.push_back(linked_ptr<ContentDetector>(
@@ -2869,7 +2871,11 @@ void RenderViewImpl::OnSuppressDialogsUntilSwapOut() {
}
void RenderViewImpl::OnClosePage() {
- FOR_EACH_OBSERVER(RenderViewObserver, observers_, ClosePage());
+ WebURLResponseExtraDataImpl* extra_data =
+ static_cast<WebURLResponseExtraDataImpl*>(
+ webview()->mainFrame()->dataSource()->response().extraData());
+ FOR_EACH_OBSERVER(RenderViewObserver, observers_,
+ ClosePage(extra_data ? extra_data->is_lofi() : false));
// TODO(creis): We'd rather use webview()->Close() here, but that currently
// sets the WebView's delegate_ to NULL, preventing any JavaScript dialogs
// in the onunload handler from appearing. For now, we're bypassing that and

Powered by Google App Engine
This is Rietveld 408576698