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 27 matching lines...) Expand all Loading... |
38 class PageLifecycleObserver; | 38 class PageLifecycleObserver; |
39 | 39 |
40 class PageLifecycleNotifier : public LifecycleNotifier<Page> { | 40 class PageLifecycleNotifier : public LifecycleNotifier<Page> { |
41 public: | 41 public: |
42 void notifyPageVisibilityChanged(); | 42 void notifyPageVisibilityChanged(); |
43 void notifyDidCommitLoad(LocalFrame*); | 43 void notifyDidCommitLoad(LocalFrame*); |
44 | 44 |
45 virtual void addObserver(Observer*) override; | 45 virtual void addObserver(Observer*) override; |
46 virtual void removeObserver(Observer*) override; | 46 virtual void removeObserver(Observer*) override; |
47 | 47 |
| 48 virtual void trace(Visitor*) override; |
| 49 |
48 protected: | 50 protected: |
49 explicit PageLifecycleNotifier(Page*); | 51 explicit PageLifecycleNotifier(Page*); |
50 | 52 |
51 private: | 53 private: |
52 using PageObserverSet = HashSet<PageLifecycleObserver*>; | 54 using PageObserverSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<PageLifecyc
leObserver>>; |
53 PageObserverSet m_pageObservers; | 55 PageObserverSet m_pageObservers; |
54 }; | 56 }; |
55 | 57 |
56 } // namespace blink | 58 } // namespace blink |
57 | 59 |
58 #endif // PageLifecycleNotifier_h | 60 #endif // PageLifecycleNotifier_h |
OLD | NEW |