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

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: remove unique policy, clean tests up a bit Created 6 years, 6 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 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 if (!webview()) 3076 if (!webview())
3077 return; 3077 return;
3078 3078
3079 WebFrame* main_frame = webview()->mainFrame(); 3079 WebFrame* main_frame = webview()->mainFrame();
3080 3080
3081 // If we have a provisional frame we are between the start and commit stages 3081 // If we have a provisional frame we are between the start and commit stages
3082 // of loading and we don't want to save stats. 3082 // of loading and we don't want to save stats.
3083 if (!main_frame->provisionalDataSource()) { 3083 if (!main_frame->provisionalDataSource()) {
3084 WebDataSource* ds = main_frame->dataSource(); 3084 WebDataSource* ds = main_frame->dataSource();
3085 DocumentState* document_state = DocumentState::FromDataSource(ds); 3085 DocumentState* document_state = DocumentState::FromDataSource(ds);
3086 InternalDocumentStateData* data =
3087 InternalDocumentStateData::FromDocumentState(document_state);
3088 if (data->did_first_visually_non_empty_layout() &&
3089 !data->did_first_visually_non_empty_paint()) {
3090 data->set_did_first_visually_non_empty_paint(true);
3091 Send(new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_));
3092 }
3093 3086
3094 // TODO(jar): The following code should all be inside a method, probably in 3087 // TODO(jar): The following code should all be inside a method, probably in
3095 // NavigatorState. 3088 // NavigatorState.
3096 Time now = Time::Now(); 3089 Time now = Time::Now();
3097 if (document_state->first_paint_time().is_null()) { 3090 if (document_state->first_paint_time().is_null()) {
3098 document_state->set_first_paint_time(now); 3091 document_state->set_first_paint_time(now);
3099 } 3092 }
3100 if (document_state->first_paint_after_load_time().is_null() && 3093 if (document_state->first_paint_after_load_time().is_null() &&
3101 !document_state->finish_load_time().is_null()) { 3094 !document_state->finish_load_time().is_null()) {
3102 document_state->set_first_paint_after_load_time(now); 3095 document_state->set_first_paint_after_load_time(now);
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
4013 std::vector<gfx::Size> sizes; 4006 std::vector<gfx::Size> sizes;
4014 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4007 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4015 if (!url.isEmpty()) 4008 if (!url.isEmpty())
4016 urls.push_back( 4009 urls.push_back(
4017 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4010 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4018 } 4011 }
4019 SendUpdateFaviconURL(urls); 4012 SendUpdateFaviconURL(urls);
4020 } 4013 }
4021 4014
4022 } // namespace content 4015 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698