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 16 matching lines...) Expand all Loading... |
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 | 36 |
37 template<> void observeContext(Page*, LifecycleObserver<Page>*); | 37 template<> void observerContext(Page*, LifecycleObserver<Page>*); |
38 template<> void unobserveContext(Page*, LifecycleObserver<Page>*); | 38 template<> void unobserverContext(Page*, LifecycleObserver<Page>*); |
39 | 39 |
40 class PageLifecycleObserver : public LifecycleObserver<Page> { | 40 class PageLifecycleObserver : public LifecycleObserver<Page> { |
41 public: | 41 public: |
42 explicit PageLifecycleObserver(Page*); | 42 explicit PageLifecycleObserver(Page*); |
43 virtual ~PageLifecycleObserver(); | 43 virtual ~PageLifecycleObserver(); |
44 | 44 |
45 Page* page() const; | 45 Page* page() const; |
46 | 46 |
47 virtual void pageVisibilityChanged() { } | 47 virtual void pageVisibilityChanged() { } |
48 virtual void didCommitLoad(LocalFrame*) { } | 48 virtual void didCommitLoad(LocalFrame*) { } |
49 }; | 49 }; |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
52 | 52 |
53 #endif // PageLifecycleObserver_h | 53 #endif // PageLifecycleObserver_h |
OLD | NEW |