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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 161113002: Fix pushState causing stop/reload button and favicon to flicker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 id, 2184 id,
2185 base::FilePath::FromUTF16Unsafe(path))); 2185 base::FilePath::FromUTF16Unsafe(path)));
2186 } 2186 }
2187 2187
2188 void RenderViewImpl::initializeHelperPluginWebFrame( 2188 void RenderViewImpl::initializeHelperPluginWebFrame(
2189 blink::WebHelperPlugin* plugin) { 2189 blink::WebHelperPlugin* plugin) {
2190 plugin->initializeFrame(main_render_frame_.get()); 2190 plugin->initializeFrame(main_render_frame_.get());
2191 } 2191 }
2192 2192
2193 void RenderViewImpl::didStartLoading(bool to_different_document) { 2193 void RenderViewImpl::didStartLoading(bool to_different_document) {
2194 didStartLoading();
2195 }
2196
2197 void RenderViewImpl::didStartLoading() {
2198 if (is_loading_) { 2194 if (is_loading_) {
2199 DVLOG(1) << "didStartLoading called while loading"; 2195 DVLOG(1) << "didStartLoading called while loading";
2200 return; 2196 return;
2201 } 2197 }
2202 2198
2203 is_loading_ = true; 2199 is_loading_ = true;
2204 2200
2205 // Send the IPC message through the top-level frame. 2201 // Send the IPC message through the top-level frame.
2206 main_render_frame_->didStartLoading(); 2202 main_render_frame_->didStartLoading(to_different_document);
2207 2203
2208 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading()); 2204 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStartLoading());
2209 } 2205 }
2210 2206
2211 void RenderViewImpl::didStopLoading() { 2207 void RenderViewImpl::didStopLoading() {
2212 if (!is_loading_) { 2208 if (!is_loading_) {
2213 DVLOG(1) << "DidStopLoading called while not loading"; 2209 DVLOG(1) << "DidStopLoading called while not loading";
2214 return; 2210 return;
2215 } 2211 }
2216 2212
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { 3841 blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const {
3846 return visibilityState(); 3842 return visibilityState();
3847 } 3843 }
3848 3844
3849 void RenderViewImpl::RunModalAlertDialog(blink::WebFrame* frame, 3845 void RenderViewImpl::RunModalAlertDialog(blink::WebFrame* frame,
3850 const blink::WebString& message) { 3846 const blink::WebString& message) {
3851 return runModalAlertDialog(frame, message); 3847 return runModalAlertDialog(frame, message);
3852 } 3848 }
3853 3849
3854 void RenderViewImpl::DidStartLoading() { 3850 void RenderViewImpl::DidStartLoading() {
3855 didStartLoading(); 3851 didStartLoading(true);
3856 } 3852 }
3857 3853
3858 void RenderViewImpl::DidStopLoading() { 3854 void RenderViewImpl::DidStopLoading() {
3859 didStopLoading(); 3855 didStopLoading();
3860 } 3856 }
3861 3857
3862 void RenderViewImpl::DidPlay(blink::WebMediaPlayer* player) { 3858 void RenderViewImpl::DidPlay(blink::WebMediaPlayer* player) {
3863 Send(new ViewHostMsg_MediaPlayingNotification(routing_id_, 3859 Send(new ViewHostMsg_MediaPlayingNotification(routing_id_,
3864 reinterpret_cast<int64>(player), 3860 reinterpret_cast<int64>(player),
3865 player->hasVideo(), 3861 player->hasVideo(),
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
5777 for (size_t i = 0; i < icon_urls.size(); i++) { 5773 for (size_t i = 0; i < icon_urls.size(); i++) {
5778 WebURL url = icon_urls[i].iconURL(); 5774 WebURL url = icon_urls[i].iconURL();
5779 if (!url.isEmpty()) 5775 if (!url.isEmpty())
5780 urls.push_back(FaviconURL(url, 5776 urls.push_back(FaviconURL(url,
5781 ToFaviconType(icon_urls[i].iconType()))); 5777 ToFaviconType(icon_urls[i].iconType())));
5782 } 5778 }
5783 SendUpdateFaviconURL(urls); 5779 SendUpdateFaviconURL(urls);
5784 } 5780 }
5785 5781
5786 } // namespace content 5782 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698