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

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: don't use metadata to stash IPC messages 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 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 if (!webview()) 3151 if (!webview())
3152 return; 3152 return;
3153 3153
3154 WebFrame* main_frame = webview()->mainFrame(); 3154 WebFrame* main_frame = webview()->mainFrame();
3155 3155
3156 // If we have a provisional frame we are between the start and commit stages 3156 // If we have a provisional frame we are between the start and commit stages
3157 // of loading and we don't want to save stats. 3157 // of loading and we don't want to save stats.
3158 if (!main_frame->provisionalDataSource()) { 3158 if (!main_frame->provisionalDataSource()) {
3159 WebDataSource* ds = main_frame->dataSource(); 3159 WebDataSource* ds = main_frame->dataSource();
3160 DocumentState* document_state = DocumentState::FromDataSource(ds); 3160 DocumentState* document_state = DocumentState::FromDataSource(ds);
3161 InternalDocumentStateData* data =
3162 InternalDocumentStateData::FromDocumentState(document_state);
3163 if (data->did_first_visually_non_empty_layout() &&
3164 !data->did_first_visually_non_empty_paint()) {
3165 data->set_did_first_visually_non_empty_paint(true);
3166 Send(new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_));
3167 }
3168 3161
3169 // TODO(jar): The following code should all be inside a method, probably in 3162 // TODO(jar): The following code should all be inside a method, probably in
3170 // NavigatorState. 3163 // NavigatorState.
3171 Time now = Time::Now(); 3164 Time now = Time::Now();
3172 if (document_state->first_paint_time().is_null()) { 3165 if (document_state->first_paint_time().is_null()) {
3173 document_state->set_first_paint_time(now); 3166 document_state->set_first_paint_time(now);
3174 } 3167 }
3175 if (document_state->first_paint_after_load_time().is_null() && 3168 if (document_state->first_paint_after_load_time().is_null() &&
3176 !document_state->finish_load_time().is_null()) { 3169 !document_state->finish_load_time().is_null()) {
3177 document_state->set_first_paint_after_load_time(now); 3170 document_state->set_first_paint_after_load_time(now);
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 std::vector<gfx::Size> sizes; 4056 std::vector<gfx::Size> sizes;
4064 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4057 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4065 if (!url.isEmpty()) 4058 if (!url.isEmpty())
4066 urls.push_back( 4059 urls.push_back(
4067 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4060 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4068 } 4061 }
4069 SendUpdateFaviconURL(urls); 4062 SendUpdateFaviconURL(urls);
4070 } 4063 }
4071 4064
4072 } // namespace content 4065 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698