| OLD | NEW |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "core/page/FocusController.h" | 44 #include "core/page/FocusController.h" |
| 45 #include "core/page/Page.h" | 45 #include "core/page/Page.h" |
| 46 #include "platform/Histogram.h" | 46 #include "platform/Histogram.h" |
| 47 #include "platform/UserGestureIndicator.h" | 47 #include "platform/UserGestureIndicator.h" |
| 48 #include "wtf/PassOwnPtr.h" | 48 #include "wtf/PassOwnPtr.h" |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| 51 | 51 |
| 52 using namespace HTMLNames; | 52 using namespace HTMLNames; |
| 53 | 53 |
| 54 namespace { | |
| 55 | |
| 56 int64_t generateFrameID() | |
| 57 { | |
| 58 // Initialize to the current time to reduce the likelihood of generating | |
| 59 // identifiers that overlap with those from past/future browser sessions. | |
| 60 static int64_t next = static_cast<int64_t>(currentTime() * 1000000.0); | |
| 61 return ++next; | |
| 62 } | |
| 63 | |
| 64 } // namespace | |
| 65 | |
| 66 Frame::~Frame() | 54 Frame::~Frame() |
| 67 { | 55 { |
| 68 InstanceCounters::decrementCounter(InstanceCounters::FrameCounter); | 56 InstanceCounters::decrementCounter(InstanceCounters::FrameCounter); |
| 69 ASSERT(!m_owner); | 57 ASSERT(!m_owner); |
| 70 } | 58 } |
| 71 | 59 |
| 72 DEFINE_TRACE(Frame) | 60 DEFINE_TRACE(Frame) |
| 73 { | 61 { |
| 74 visitor->trace(m_treeNode); | 62 visitor->trace(m_treeNode); |
| 75 visitor->trace(m_host); | 63 visitor->trace(m_host); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 if (m_host) | 286 if (m_host) |
| 299 return &m_host->settings(); | 287 return &m_host->settings(); |
| 300 return nullptr; | 288 return nullptr; |
| 301 } | 289 } |
| 302 | 290 |
| 303 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) | 291 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) |
| 304 : m_treeNode(this) | 292 : m_treeNode(this) |
| 305 , m_host(host) | 293 , m_host(host) |
| 306 , m_owner(owner) | 294 , m_owner(owner) |
| 307 , m_client(client) | 295 , m_client(client) |
| 308 , m_frameID(generateFrameID()) | |
| 309 , m_isLoading(false) | 296 , m_isLoading(false) |
| 310 { | 297 { |
| 311 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); | 298 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); |
| 312 | 299 |
| 313 ASSERT(page()); | 300 ASSERT(page()); |
| 314 | 301 |
| 315 if (m_owner) | 302 if (m_owner) |
| 316 m_owner->setContentFrame(*this); | 303 m_owner->setContentFrame(*this); |
| 317 else | 304 else |
| 318 page()->setMainFrame(this); | 305 page()->setMainFrame(this); |
| 319 } | 306 } |
| 320 | 307 |
| 321 } // namespace blink | 308 } // namespace blink |
| OLD | NEW |