OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. Use of |
| 2 // this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DocumentShutdownObserver_h |
| 6 #define DocumentShutdownObserver_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/LifecycleObserver.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class Document; |
| 14 |
| 15 // This class is a base class for classes which observe Document shutdown |
| 16 // synchronously. |
| 17 // Note: this functionality is also provided by SynchronousMutationObserver, |
| 18 // but if you don't need to respond to the other events handled by that class, |
| 19 // using this class is more efficient. |
| 20 class CORE_EXPORT DocumentShutdownObserver |
| 21 : public LifecycleObserver<Document, DocumentShutdownObserver> { |
| 22 public: |
| 23 // Called when detaching document. |
| 24 virtual void ContextDestroyed(Document*); |
| 25 |
| 26 protected: |
| 27 DocumentShutdownObserver(); |
| 28 |
| 29 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(DocumentShutdownObserver); |
| 31 }; |
| 32 |
| 33 } // namespace blink |
| 34 |
| 35 #endif // DocumentShutdownObserver_h |
OLD | NEW |