OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #ifndef PageLifecycleObserver_h | 27 #ifndef PageLifecycleObserver_h |
28 #define PageLifecycleObserver_h | 28 #define PageLifecycleObserver_h |
29 | 29 |
30 #include "core/page/Page.h" | 30 #include "core/page/Page.h" |
31 #include "platform/LifecycleObserver.h" | 31 #include "platform/LifecycleObserver.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class LocalFrame; | 35 class LocalFrame; |
| 36 class PageLifecycleNotifier; |
36 | 37 |
37 template<> void observeContext(Page*, LifecycleObserver<Page>*); | 38 class PageLifecycleObserver : public LifecycleObserver<Page, PageLifecycleObserv
er, PageLifecycleNotifier> { |
38 template<> void unobserveContext(Page*, LifecycleObserver<Page>*); | |
39 | |
40 class PageLifecycleObserver : public LifecycleObserver<Page> { | |
41 public: | 39 public: |
42 explicit PageLifecycleObserver(Page*); | 40 virtual void pageVisibilityChanged() { } |
43 virtual ~PageLifecycleObserver(); | 41 virtual void didCommitLoad(LocalFrame*) { } |
44 | 42 |
45 Page* page() const; | 43 Page* page() const; |
46 | 44 |
47 virtual void pageVisibilityChanged() { } | 45 protected: |
48 virtual void didCommitLoad(LocalFrame*) { } | 46 explicit PageLifecycleObserver(Page*); |
| 47 virtual ~PageLifecycleObserver(); |
49 }; | 48 }; |
50 | 49 |
51 } // namespace blink | 50 } // namespace blink |
52 | 51 |
53 #endif // PageLifecycleObserver_h | 52 #endif // PageLifecycleObserver_h |
OLD | NEW |