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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2712773002: Add trace event for detecting main frame in loading metrics. (Closed)
Patch Set: fix condition Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/web/WebFrame.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 } 1589 }
1590 1590
1591 // TODO(dominickn): This interface should be document-scoped rather than 1591 // TODO(dominickn): This interface should be document-scoped rather than
1592 // frame-scoped, as the resulting banner event is dispatched to 1592 // frame-scoped, as the resulting banner event is dispatched to
1593 // frame()->document(). 1593 // frame()->document().
1594 frame()->interfaceRegistry()->addInterface(WTF::bind( 1594 frame()->interfaceRegistry()->addInterface(WTF::bind(
1595 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame()))); 1595 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame())));
1596 1596
1597 frame()->interfaceRegistry()->addInterface(WTF::bind( 1597 frame()->interfaceRegistry()->addInterface(WTF::bind(
1598 &InstallationServiceImpl::create, wrapWeakPersistent(frame()))); 1598 &InstallationServiceImpl::create, wrapWeakPersistent(frame())));
1599 if (!owner) {
1600 // This trace event is needed to detect the main frame of the
1601 // renderer in telemetry metrics. See crbug.com/692112#c11.
1602 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame",
1603 TRACE_EVENT_SCOPE_THREAD, "frame", frame());
1604 }
1599 } 1605 }
1600 } 1606 }
1601 1607
1602 LocalFrame* WebLocalFrameImpl::createChildFrame( 1608 LocalFrame* WebLocalFrameImpl::createChildFrame(
1603 const FrameLoadRequest& request, 1609 const FrameLoadRequest& request,
1604 const AtomicString& name, 1610 const AtomicString& name,
1605 HTMLFrameOwnerElement* ownerElement) { 1611 HTMLFrameOwnerElement* ownerElement) {
1606 DCHECK(m_client); 1612 DCHECK(m_client);
1607 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1613 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1608 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1614 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2444 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2439 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2445 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2440 } else { 2446 } else {
2441 clipHtml = 2447 clipHtml =
2442 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2448 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2443 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2449 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2444 } 2450 }
2445 } 2451 }
2446 2452
2447 } // namespace blink 2453 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698