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

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

Issue 670513003: Fixed the reporting of paint times in window.chrome.loadTimes() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed parent check and added TODO Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3321 #endif 3321 #endif
3322 3322
3323 // If the RenderWidget is closing down then early-exit, otherwise we'll crash. 3323 // If the RenderWidget is closing down then early-exit, otherwise we'll crash.
3324 // See crbug.com/112921. 3324 // See crbug.com/112921.
3325 if (!webview()) 3325 if (!webview())
3326 return; 3326 return;
3327 3327
3328 WebFrame* main_frame = webview()->mainFrame(); 3328 WebFrame* main_frame = webview()->mainFrame();
3329 for (WebFrame* frame = main_frame; frame; 3329 for (WebFrame* frame = main_frame; frame;
3330 frame = frame->traverseNext(false)) { 3330 frame = frame->traverseNext(false)) {
3331 if (frame->isWebLocalFrame()) 3331 // TODO(nasko): This is a hack for the case in which the top-level
3332 // frame is being rendered in another process. It will not
3333 // behave correctly for out of process iframes.
3334 if (frame->isWebLocalFrame()) {
3332 main_frame = frame; 3335 main_frame = frame;
3336 break;
3337 }
3333 } 3338 }
3334 3339
3335 // If we have a provisional frame we are between the start and commit stages 3340 // If we have a provisional frame we are between the start and commit stages
3336 // of loading and we don't want to save stats. 3341 // of loading and we don't want to save stats.
3337 if (!main_frame->provisionalDataSource()) { 3342 if (!main_frame->provisionalDataSource()) {
3338 WebDataSource* ds = main_frame->dataSource(); 3343 WebDataSource* ds = main_frame->dataSource();
3339 DocumentState* document_state = DocumentState::FromDataSource(ds); 3344 DocumentState* document_state = DocumentState::FromDataSource(ds);
3340 3345
3341 // TODO(jar): The following code should all be inside a method, probably in 3346 // TODO(jar): The following code should all be inside a method, probably in
3342 // NavigatorState. 3347 // NavigatorState.
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
4199 std::vector<gfx::Size> sizes; 4204 std::vector<gfx::Size> sizes;
4200 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4205 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4201 if (!url.isEmpty()) 4206 if (!url.isEmpty())
4202 urls.push_back( 4207 urls.push_back(
4203 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4208 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4204 } 4209 }
4205 SendUpdateFaviconURL(urls); 4210 SendUpdateFaviconURL(urls);
4206 } 4211 }
4207 4212
4208 } // namespace content 4213 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698