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

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: disable browsertest for android for realz this time Created 6 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 | 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 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after
3385 if (!webview()) 3385 if (!webview())
3386 return; 3386 return;
3387 3387
3388 WebFrame* main_frame = webview()->mainFrame(); 3388 WebFrame* main_frame = webview()->mainFrame();
3389 3389
3390 // If we have a provisional frame we are between the start and commit stages 3390 // If we have a provisional frame we are between the start and commit stages
3391 // of loading and we don't want to save stats. 3391 // of loading and we don't want to save stats.
3392 if (!main_frame->provisionalDataSource()) { 3392 if (!main_frame->provisionalDataSource()) {
3393 WebDataSource* ds = main_frame->dataSource(); 3393 WebDataSource* ds = main_frame->dataSource();
3394 DocumentState* document_state = DocumentState::FromDataSource(ds); 3394 DocumentState* document_state = DocumentState::FromDataSource(ds);
3395 InternalDocumentStateData* data =
3396 InternalDocumentStateData::FromDocumentState(document_state);
3397 if (data->did_first_visually_non_empty_layout() &&
3398 !data->did_first_visually_non_empty_paint()) {
3399 data->set_did_first_visually_non_empty_paint(true);
3400 Send(new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_));
3401 }
3402 3395
3403 // TODO(jar): The following code should all be inside a method, probably in 3396 // TODO(jar): The following code should all be inside a method, probably in
3404 // NavigatorState. 3397 // NavigatorState.
3405 Time now = Time::Now(); 3398 Time now = Time::Now();
3406 if (document_state->first_paint_time().is_null()) { 3399 if (document_state->first_paint_time().is_null()) {
3407 document_state->set_first_paint_time(now); 3400 document_state->set_first_paint_time(now);
3408 } 3401 }
3409 if (document_state->first_paint_after_load_time().is_null() && 3402 if (document_state->first_paint_after_load_time().is_null() &&
3410 !document_state->finish_load_time().is_null()) { 3403 !document_state->finish_load_time().is_null()) {
3411 document_state->set_first_paint_after_load_time(now); 3404 document_state->set_first_paint_after_load_time(now);
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
4287 std::vector<gfx::Size> sizes; 4280 std::vector<gfx::Size> sizes;
4288 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4281 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4289 if (!url.isEmpty()) 4282 if (!url.isEmpty())
4290 urls.push_back( 4283 urls.push_back(
4291 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4284 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4292 } 4285 }
4293 SendUpdateFaviconURL(urls); 4286 SendUpdateFaviconURL(urls);
4294 } 4287 }
4295 4288
4296 } // namespace content 4289 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698