| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 enum PageshowEventPersistence { | 60 enum PageshowEventPersistence { |
| 61 PageshowEventNotPersisted = 0, | 61 PageshowEventNotPersisted = 0, |
| 62 PageshowEventPersisted = 1 | 62 PageshowEventPersisted = 1 |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 // Note: if you're thinking of returning something DOM-related by reference, | 65 // Note: if you're thinking of returning something DOM-related by reference, |
| 66 // please ping dcheng@chromium.org first. You probably don't want to do that. | 66 // please ping dcheng@chromium.org first. You probably don't want to do that. |
| 67 class CORE_EXPORT LocalDOMWindow final : public DOMWindow, public WillBeHeapSupp
lementable<LocalDOMWindow>, public DOMWindowLifecycleNotifier { | 67 class CORE_EXPORT LocalDOMWindow final : public DOMWindow, public WillBeHeapSupp
lementable<LocalDOMWindow>, public DOMWindowLifecycleNotifier { |
| 68 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); | 68 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); |
| 69 WILL_BE_USING_PRE_FINALIZER(LocalDOMWindow, dispose); |
| 69 public: | 70 public: |
| 70 static PassRefPtrWillBeRawPtr<Document> createDocument(const String& mimeTyp
e, const DocumentInit&, bool forceXHTML); | 71 static PassRefPtrWillBeRawPtr<Document> createDocument(const String& mimeTyp
e, const DocumentInit&, bool forceXHTML); |
| 71 static PassRefPtrWillBeRawPtr<LocalDOMWindow> create(LocalFrame& frame) | 72 static PassRefPtrWillBeRawPtr<LocalDOMWindow> create(LocalFrame& frame) |
| 72 { | 73 { |
| 73 return adoptRefWillBeNoop(new LocalDOMWindow(frame)); | 74 return adoptRefWillBeNoop(new LocalDOMWindow(frame)); |
| 74 } | 75 } |
| 76 |
| 75 virtual ~LocalDOMWindow(); | 77 virtual ~LocalDOMWindow(); |
| 78 void dispose(); |
| 76 | 79 |
| 77 // LocalDOMWindow is eagerly finalized to allow the destructor | |
| 78 // to remove any event listeners still attached. | |
| 79 EAGERLY_FINALIZE(); | |
| 80 DECLARE_VIRTUAL_TRACE(); | 80 DECLARE_VIRTUAL_TRACE(); |
| 81 | 81 |
| 82 PassRefPtrWillBeRawPtr<Document> installNewDocument(const String& mimeType,
const DocumentInit&, bool forceXHTML = false); | 82 PassRefPtrWillBeRawPtr<Document> installNewDocument(const String& mimeType,
const DocumentInit&, bool forceXHTML = false); |
| 83 | 83 |
| 84 // EventTarget overrides: | 84 // EventTarget overrides: |
| 85 virtual ExecutionContext* executionContext() const override; | 85 virtual ExecutionContext* executionContext() const override; |
| 86 virtual LocalDOMWindow* toDOMWindow() override; | 86 virtual LocalDOMWindow* toDOMWindow() override; |
| 87 | 87 |
| 88 // DOMWindow overrides: | 88 // DOMWindow overrides: |
| 89 bool isLocalDOMWindow() const override { return true; } | 89 bool isLocalDOMWindow() const override { return true; } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 inline String LocalDOMWindow::defaultStatus() const | 289 inline String LocalDOMWindow::defaultStatus() const |
| 290 { | 290 { |
| 291 return m_defaultStatus; | 291 return m_defaultStatus; |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace blink | 294 } // namespace blink |
| 295 | 295 |
| 296 #endif // LocalDOMWindow_h | 296 #endif // LocalDOMWindow_h |
| OLD | NEW |