| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 | 479 |
| 480 void LocalDOMWindow::frameDestroyed() { | 480 void LocalDOMWindow::frameDestroyed() { |
| 481 resetLocation(); | 481 resetLocation(); |
| 482 removeAllEventListeners(); | 482 removeAllEventListeners(); |
| 483 disconnectFromFrame(); | 483 disconnectFromFrame(); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void LocalDOMWindow::registerEventListenerObserver( | 486 void LocalDOMWindow::registerEventListenerObserver( |
| 487 EventListenerObserver* eventListenerObserver) { | 487 EventListenerObserver* eventListenerObserver) { |
| 488 m_eventListenerObservers.add(eventListenerObserver); | 488 m_eventListenerObservers.insert(eventListenerObserver); |
| 489 } | 489 } |
| 490 | 490 |
| 491 void LocalDOMWindow::reset() { | 491 void LocalDOMWindow::reset() { |
| 492 DCHECK(document()); | 492 DCHECK(document()); |
| 493 DCHECK(document()->isContextDestroyed()); | 493 DCHECK(document()->isContextDestroyed()); |
| 494 frameDestroyed(); | 494 frameDestroyed(); |
| 495 | 495 |
| 496 m_screen = nullptr; | 496 m_screen = nullptr; |
| 497 m_history = nullptr; | 497 m_history = nullptr; |
| 498 m_locationbar = nullptr; | 498 m_locationbar = nullptr; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 Document* source) { | 616 Document* source) { |
| 617 // Allowing unbounded amounts of messages to build up for a suspended context | 617 // Allowing unbounded amounts of messages to build up for a suspended context |
| 618 // is problematic; consider imposing a limit or other restriction if this | 618 // is problematic; consider imposing a limit or other restriction if this |
| 619 // surfaces often as a problem (see crbug.com/587012). | 619 // surfaces often as a problem (see crbug.com/587012). |
| 620 std::unique_ptr<SourceLocation> location = SourceLocation::capture(source); | 620 std::unique_ptr<SourceLocation> location = SourceLocation::capture(source); |
| 621 PostMessageTimer* timer = | 621 PostMessageTimer* timer = |
| 622 new PostMessageTimer(*this, event, std::move(target), std::move(location), | 622 new PostMessageTimer(*this, event, std::move(target), std::move(location), |
| 623 UserGestureIndicator::currentToken()); | 623 UserGestureIndicator::currentToken()); |
| 624 timer->startOneShot(0, BLINK_FROM_HERE); | 624 timer->startOneShot(0, BLINK_FROM_HERE); |
| 625 timer->suspendIfNeeded(); | 625 timer->suspendIfNeeded(); |
| 626 m_postMessageTimers.add(timer); | 626 m_postMessageTimers.insert(timer); |
| 627 } | 627 } |
| 628 | 628 |
| 629 void LocalDOMWindow::postMessageTimerFired(PostMessageTimer* timer) { | 629 void LocalDOMWindow::postMessageTimerFired(PostMessageTimer* timer) { |
| 630 if (!isCurrentlyDisplayedInFrame()) | 630 if (!isCurrentlyDisplayedInFrame()) |
| 631 return; | 631 return; |
| 632 | 632 |
| 633 MessageEvent* event = timer->event(); | 633 MessageEvent* event = timer->event(); |
| 634 | 634 |
| 635 UserGestureIndicator gestureIndicator( | 635 UserGestureIndicator gestureIndicator( |
| 636 DocumentUserGestureToken::adopt(document(), timer->userGestureToken())); | 636 DocumentUserGestureToken::adopt(document(), timer->userGestureToken())); |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1615 DOMWindow::trace(visitor); | 1615 DOMWindow::trace(visitor); |
| 1616 Supplementable<LocalDOMWindow>::trace(visitor); | 1616 Supplementable<LocalDOMWindow>::trace(visitor); |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1619 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
| 1620 visitor->traceWrappers(m_customElements); | 1620 visitor->traceWrappers(m_customElements); |
| 1621 DOMWindow::traceWrappers(visitor); | 1621 DOMWindow::traceWrappers(visitor); |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 } // namespace blink | 1624 } // namespace blink |
| OLD | NEW |