| 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 PageVisibilityObserver_h | 27 #ifndef PageVisibilityObserver_h |
| 28 #define PageVisibilityObserver_h | 28 #define PageVisibilityObserver_h |
| 29 | 29 |
| 30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
| 31 #include "core/page/Page.h" | 31 #include "core/page/Page.h" |
| 32 #include "platform/LifecycleObserver.h" | 32 #include "platform/LifecycleObserver.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class LocalFrame; | |
| 37 | 36 |
| 38 class CORE_EXPORT PageVisibilityObserver | 37 class CORE_EXPORT PageVisibilityObserver |
| 39 : public LifecycleObserver<Page, PageVisibilityObserver> { | 38 : public LifecycleObserver<Page, PageVisibilityObserver> { |
| 40 public: | 39 public: |
| 41 virtual void pageVisibilityChanged() {} | 40 virtual void pageVisibilityChanged() {} |
| 42 | 41 |
| 43 Page* page() const { return lifecycleContext(); } | 42 Page* page() const { return lifecycleContext(); } |
| 44 | 43 |
| 45 protected: | 44 protected: |
| 46 explicit PageVisibilityObserver(Page* page) : LifecycleObserver(page) {} | 45 explicit PageVisibilityObserver(Page* page) : LifecycleObserver(page) {} |
| 47 }; | 46 }; |
| 48 | 47 |
| 49 } // namespace blink | 48 } // namespace blink |
| 50 | 49 |
| 51 #endif // PageVisibilityObserver_h | 50 #endif // PageVisibilityObserver_h |
| OLD | NEW |