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

Side by Side Diff: Source/core/frame/Frame.cpp

Issue 390193003: [not for review] Add Draw entries to window Performance Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Git pull syncup Created 6 years, 3 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 | « Source/core/frame/Frame.h ('k') | Source/core/frame/UseCounter.h » ('j') | 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "core/rendering/RenderPart.h" 48 #include "core/rendering/RenderPart.h"
49 #include "platform/graphics/GraphicsLayer.h" 49 #include "platform/graphics/GraphicsLayer.h"
50 #include "public/platform/WebLayer.h" 50 #include "public/platform/WebLayer.h"
51 #include "wtf/PassOwnPtr.h" 51 #include "wtf/PassOwnPtr.h"
52 #include "wtf/RefCountedLeakCounter.h" 52 #include "wtf/RefCountedLeakCounter.h"
53 53
54 namespace blink { 54 namespace blink {
55 55
56 using namespace HTMLNames; 56 using namespace HTMLNames;
57 57
58 namespace {
59
60 int64_t generateFrameID()
61 {
62 // Initialize to the current time to reduce the likelihood of generating
63 // identifiers that overlap with those from past/future browser sessions.
64 static int64_t next = static_cast<int64_t>(currentTime() * 1000000.0);
65 return ++next;
66 }
67
68 } // namespace
69
58 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, frameCounter, ("Frame")); 70 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, frameCounter, ("Frame"));
59 71
60 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) 72 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
61 : m_treeNode(this) 73 : m_treeNode(this)
62 , m_host(host) 74 , m_host(host)
63 , m_owner(owner) 75 , m_owner(owner)
64 , m_client(client) 76 , m_client(client)
77 , m_frameID(generateFrameID())
65 , m_remotePlatformLayer(0) 78 , m_remotePlatformLayer(0)
66 { 79 {
67 ASSERT(page()); 80 ASSERT(page());
68 81
69 #ifndef NDEBUG 82 #ifndef NDEBUG
70 frameCounter.increment(); 83 frameCounter.increment();
71 #endif 84 #endif
72 85
73 if (m_owner) { 86 if (m_owner) {
74 page()->incrementSubframeCount(); 87 page()->incrementSubframeCount();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 212 }
200 m_owner = 0; 213 m_owner = 0;
201 } 214 }
202 215
203 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const 216 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const
204 { 217 {
205 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0; 218 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : 0;
206 } 219 }
207 220
208 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/Frame.h ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698