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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2114213002: Fix loading placeholders for Lo-Fi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 4 years, 5 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/child/request_extra_data.h » ('j') | content/child/request_extra_data.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 void WebContentsImpl::ReloadFocusedFrame(bool bypass_cache) { 2552 void WebContentsImpl::ReloadFocusedFrame(bool bypass_cache) {
2553 RenderFrameHost* focused_frame = GetFocusedFrame(); 2553 RenderFrameHost* focused_frame = GetFocusedFrame();
2554 if (!focused_frame) 2554 if (!focused_frame)
2555 return; 2555 return;
2556 2556
2557 focused_frame->Send(new FrameMsg_Reload( 2557 focused_frame->Send(new FrameMsg_Reload(
2558 focused_frame->GetRoutingID(), bypass_cache)); 2558 focused_frame->GetRoutingID(), bypass_cache));
2559 } 2559 }
2560 2560
2561 void WebContentsImpl::ReloadLoFiImages() { 2561 void WebContentsImpl::ReloadLoFiImages() {
2562 // Lo-Fi images must first be disabled synchronously so new frames are not
2563 // created with Lo-Fi enabled.
2564 SendToAllFrames(new FrameMsg_DisableLoFiImages(MSG_ROUTING_NONE));
clamy 2016/07/07 15:16:30 I'm not sure this works with PlzNavigate enabled.
megjablon 2016/07/07 19:31:52 Will didCommitProvisionalLoad be called later for
clamy 2016/07/08 14:46:26 Well if you have a navigation that's ongoing we ca
2562 SendToAllFrames(new FrameMsg_ReloadLoFiImages(MSG_ROUTING_NONE)); 2565 SendToAllFrames(new FrameMsg_ReloadLoFiImages(MSG_ROUTING_NONE));
2563 } 2566 }
2564 2567
2565 void WebContentsImpl::Undo() { 2568 void WebContentsImpl::Undo() {
2566 RenderFrameHost* focused_frame = GetFocusedFrame(); 2569 RenderFrameHost* focused_frame = GetFocusedFrame();
2567 if (!focused_frame) 2570 if (!focused_frame)
2568 return; 2571 return;
2569 2572
2570 focused_frame->Send(new InputMsg_Undo(focused_frame->GetRoutingID())); 2573 focused_frame->Send(new InputMsg_Undo(focused_frame->GetRoutingID()));
2571 RecordAction(base::UserMetricsAction("Undo")); 2574 RecordAction(base::UserMetricsAction("Undo"));
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after
5161 for (RenderViewHost* render_view_host : render_view_host_set) 5164 for (RenderViewHost* render_view_host : render_view_host_set)
5162 render_view_host->OnWebkitPreferencesChanged(); 5165 render_view_host->OnWebkitPreferencesChanged();
5163 } 5166 }
5164 5167
5165 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5168 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5166 JavaScriptDialogManager* dialog_manager) { 5169 JavaScriptDialogManager* dialog_manager) {
5167 dialog_manager_ = dialog_manager; 5170 dialog_manager_ = dialog_manager;
5168 } 5171 }
5169 5172
5170 } // namespace content 5173 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/request_extra_data.h » ('j') | content/child/request_extra_data.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698