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

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

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after
3145 if (!webview()) 3145 if (!webview())
3146 return; 3146 return;
3147 3147
3148 WebFrame* main_frame = webview()->mainFrame(); 3148 WebFrame* main_frame = webview()->mainFrame();
3149 3149
3150 // If we have a provisional frame we are between the start and commit stages 3150 // If we have a provisional frame we are between the start and commit stages
3151 // of loading and we don't want to save stats. 3151 // of loading and we don't want to save stats.
3152 if (!main_frame->provisionalDataSource()) { 3152 if (!main_frame->provisionalDataSource()) {
3153 WebDataSource* ds = main_frame->dataSource(); 3153 WebDataSource* ds = main_frame->dataSource();
3154 DocumentState* document_state = DocumentState::FromDataSource(ds); 3154 DocumentState* document_state = DocumentState::FromDataSource(ds);
3155 InternalDocumentStateData* data =
3156 InternalDocumentStateData::FromDocumentState(document_state);
3157 if (data->did_first_visually_non_empty_layout() &&
3158 !data->did_first_visually_non_empty_paint()) {
3159 data->set_did_first_visually_non_empty_paint(true);
3160 Send(new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_));
3161 }
3162 3155
3163 // TODO(jar): The following code should all be inside a method, probably in 3156 // TODO(jar): The following code should all be inside a method, probably in
3164 // NavigatorState. 3157 // NavigatorState.
3165 Time now = Time::Now(); 3158 Time now = Time::Now();
3166 if (document_state->first_paint_time().is_null()) { 3159 if (document_state->first_paint_time().is_null()) {
3167 document_state->set_first_paint_time(now); 3160 document_state->set_first_paint_time(now);
3168 } 3161 }
3169 if (document_state->first_paint_after_load_time().is_null() && 3162 if (document_state->first_paint_after_load_time().is_null() &&
3170 !document_state->finish_load_time().is_null()) { 3163 !document_state->finish_load_time().is_null()) {
3171 document_state->set_first_paint_after_load_time(now); 3164 document_state->set_first_paint_after_load_time(now);
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
4087 std::vector<gfx::Size> sizes; 4080 std::vector<gfx::Size> sizes;
4088 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4081 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4089 if (!url.isEmpty()) 4082 if (!url.isEmpty())
4090 urls.push_back( 4083 urls.push_back(
4091 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4084 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4092 } 4085 }
4093 SendUpdateFaviconURL(urls); 4086 SendUpdateFaviconURL(urls);
4094 } 4087 }
4095 4088
4096 } // namespace content 4089 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698