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/page/PageLifecycleObserver.h" | 29 #include "core/page/PageLifecycleObserver.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 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class Page; | 36 class Page; |
37 class Frame; | 37 class Frame; |
38 | 38 |
39 class PageLifecycleNotifier : public LifecycleNotifier<Page> { | 39 class PageLifecycleNotifier FINAL : public LifecycleNotifier<Page> { |
40 public: | 40 public: |
41 static PassOwnPtr<PageLifecycleNotifier> create(Page*); | 41 static PassOwnPtr<PageLifecycleNotifier> create(Page*); |
42 | 42 |
43 void notifyPageVisibilityChanged(); | 43 void notifyPageVisibilityChanged(); |
44 void notifyDidCommitLoad(Frame*); | 44 void notifyDidCommitLoad(Frame*); |
45 | 45 |
46 virtual void addObserver(Observer*) OVERRIDE; | 46 virtual void addObserver(Observer*) OVERRIDE; |
47 virtual void removeObserver(Observer*) OVERRIDE; | 47 virtual void removeObserver(Observer*) OVERRIDE; |
48 | 48 |
49 private: | 49 private: |
(...skipping 18 matching lines...) Expand all Loading... |
68 inline void PageLifecycleNotifier::notifyDidCommitLoad(Frame* frame) | 68 inline void PageLifecycleNotifier::notifyDidCommitLoad(Frame* frame) |
69 { | 69 { |
70 TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverPageObs
ervers); | 70 TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverPageObs
ervers); |
71 for (PageObserverSet::iterator it = m_pageObservers.begin(); it != m_pageObs
ervers.end(); ++it) | 71 for (PageObserverSet::iterator it = m_pageObservers.begin(); it != m_pageObs
ervers.end(); ++it) |
72 (*it)->didCommitLoad(frame); | 72 (*it)->didCommitLoad(frame); |
73 } | 73 } |
74 | 74 |
75 } // namespace WebCore | 75 } // namespace WebCore |
76 | 76 |
77 #endif // PageLifecycleNotifier_h | 77 #endif // PageLifecycleNotifier_h |
OLD | NEW |