OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "core/frame/DOMWindowLifecycleObserver.h" | 29 #include "core/frame/DOMWindowLifecycleObserver.h" |
30 #include "platform/LifecycleNotifier.h" | 30 #include "platform/LifecycleNotifier.h" |
31 #include "wtf/PassOwnPtr.h" | 31 #include "wtf/PassOwnPtr.h" |
32 #include "wtf/TemporaryChange.h" | 32 #include "wtf/TemporaryChange.h" |
33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class DOMWindow; | 37 class DOMWindow; |
38 | 38 |
39 class DOMWindowLifecycleNotifier : public LifecycleNotifier<DOMWindow> { | 39 class DOMWindowLifecycleNotifier FINAL : public LifecycleNotifier<DOMWindow> { |
40 public: | 40 public: |
41 static PassOwnPtr<DOMWindowLifecycleNotifier> create(DOMWindow*); | 41 static PassOwnPtr<DOMWindowLifecycleNotifier> create(DOMWindow*); |
42 | 42 |
43 void notifyAddEventListener(DOMWindow*, const AtomicString& eventType); | 43 void notifyAddEventListener(DOMWindow*, const AtomicString& eventType); |
44 void notifyRemoveEventListener(DOMWindow*, const AtomicString& eventType); | 44 void notifyRemoveEventListener(DOMWindow*, const AtomicString& eventType); |
45 void notifyRemoveAllEventListeners(DOMWindow*); | 45 void notifyRemoveAllEventListeners(DOMWindow*); |
46 | 46 |
47 virtual void addObserver(Observer*) OVERRIDE; | 47 virtual void addObserver(Observer*) OVERRIDE; |
48 virtual void removeObserver(Observer*) OVERRIDE; | 48 virtual void removeObserver(Observer*) OVERRIDE; |
49 | 49 |
50 private: | 50 private: |
51 explicit DOMWindowLifecycleNotifier(DOMWindow*); | 51 explicit DOMWindowLifecycleNotifier(DOMWindow*); |
52 | 52 |
53 typedef HashSet<DOMWindowLifecycleObserver*> DOMWindowObserverSet; | 53 typedef HashSet<DOMWindowLifecycleObserver*> DOMWindowObserverSet; |
54 DOMWindowObserverSet m_windowObservers; | 54 DOMWindowObserverSet m_windowObservers; |
55 }; | 55 }; |
56 | 56 |
57 } // namespace WebCore | 57 } // namespace WebCore |
58 | 58 |
59 #endif // DOMWindowLifecycleNotifier_h | 59 #endif // DOMWindowLifecycleNotifier_h |
OLD | NEW |