Chromium Code Reviews| 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 654 { | 654 { |
| 655 if (!isCurrentlyDisplayedInFrame()) | 655 if (!isCurrentlyDisplayedInFrame()) |
| 656 return nullptr; | 656 return nullptr; |
| 657 if (!m_applicationCache) | 657 if (!m_applicationCache) |
| 658 m_applicationCache = ApplicationCache::create(frame()); | 658 m_applicationCache = ApplicationCache::create(frame()); |
| 659 return m_applicationCache.get(); | 659 return m_applicationCache.get(); |
| 660 } | 660 } |
| 661 | 661 |
| 662 Navigator* LocalDOMWindow::navigator() const | 662 Navigator* LocalDOMWindow::navigator() const |
| 663 { | 663 { |
| 664 if (frame() && frame()->domWindow() != this) { | |
|
haraken
2015/08/24 02:22:15
It would be better to use:
if (!isCurrentlyDisp
yhirano
2015/08/24 03:27:11
Done.
| |
| 665 // This window is already detached. | |
| 666 ASSERT(!m_navigator); | |
| 667 return nullptr; | |
| 668 } | |
| 669 | |
| 664 if (!m_navigator) | 670 if (!m_navigator) |
| 665 m_navigator = Navigator::create(frame()); | 671 m_navigator = Navigator::create(frame()); |
| 666 return m_navigator.get(); | 672 return m_navigator.get(); |
| 667 } | 673 } |
| 668 | 674 |
| 669 void LocalDOMWindow::schedulePostMessage(PassRefPtrWillBeRawPtr<MessageEvent> ev ent, LocalDOMWindow* source, SecurityOrigin* target, PassRefPtrWillBeRawPtr<Scri ptCallStack> stackTrace) | 675 void LocalDOMWindow::schedulePostMessage(PassRefPtrWillBeRawPtr<MessageEvent> ev ent, LocalDOMWindow* source, SecurityOrigin* target, PassRefPtrWillBeRawPtr<Scri ptCallStack> stackTrace) |
| 670 { | 676 { |
| 671 // Schedule the message. | 677 // Schedule the message. |
| 672 OwnPtrWillBeRawPtr<PostMessageTimer> timer = adoptPtrWillBeNoop(new PostMess ageTimer(*this, event, source, target, stackTrace, UserGestureIndicator::current Token())); | 678 OwnPtrWillBeRawPtr<PostMessageTimer> timer = adoptPtrWillBeNoop(new PostMess ageTimer(*this, event, source, target, stackTrace, UserGestureIndicator::current Token())); |
| 673 timer->startOneShot(0, FROM_HERE); | 679 timer->startOneShot(0, FROM_HERE); |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1487 DOMWindow::trace(visitor); | 1493 DOMWindow::trace(visitor); |
| 1488 DOMWindowLifecycleNotifier::trace(visitor); | 1494 DOMWindowLifecycleNotifier::trace(visitor); |
| 1489 } | 1495 } |
| 1490 | 1496 |
| 1491 LocalFrame* LocalDOMWindow::frame() const | 1497 LocalFrame* LocalDOMWindow::frame() const |
| 1492 { | 1498 { |
| 1493 return m_frameObserver->frame(); | 1499 return m_frameObserver->frame(); |
| 1494 } | 1500 } |
| 1495 | 1501 |
| 1496 } // namespace blink | 1502 } // namespace blink |
| OLD | NEW |