| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2011 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/frame/LocalFrame.h" | 30 #include "core/frame/LocalFrame.h" |
| 31 #include "platform/LifecycleObserver.h" | 31 #include "platform/LifecycleObserver.h" |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class LocalFrame; | 36 class LocalFrame; |
| 37 | 37 |
| 38 class CORE_EXPORT LocalFrameLifecycleObserver : public LifecycleObserver<LocalFr
ame, LocalFrameLifecycleObserver> { | 38 class CORE_EXPORT LocalFrameLifecycleObserver : public LifecycleObserver<LocalFr
ame, LocalFrameLifecycleObserver> { |
| 39 public: | 39 public: |
| 40 virtual void willDetachFrameHost() { } | |
| 41 virtual void contextDestroyed() | 40 virtual void contextDestroyed() |
| 42 { | 41 { |
| 43 setContext(nullptr); | 42 setContext(nullptr); |
| 44 } | 43 } |
| 45 | 44 |
| 46 LocalFrame* frame() const { return lifecycleContext(); } | 45 LocalFrame* frame() const { return lifecycleContext(); } |
| 47 | 46 |
| 48 protected: | 47 protected: |
| 49 explicit LocalFrameLifecycleObserver(LocalFrame* frame) | 48 explicit LocalFrameLifecycleObserver(LocalFrame* frame) |
| 50 : LifecycleObserver(frame) | 49 : LifecycleObserver(frame) |
| 51 { | 50 { |
| 52 } | 51 } |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 } // namespace blink | 54 } // namespace blink |
| 56 | 55 |
| 57 #endif // LocalFrameLifecycleObserver_h | 56 #endif // LocalFrameLifecycleObserver_h |
| OLD | NEW |