OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef FrameLifecycle_h | 5 #ifndef FrameLifecycle_h |
6 #define FrameLifecycle_h | 6 #define FrameLifecycle_h |
7 | 7 |
8 #include "wtf/Noncopyable.h" | 8 #include "platform/wtf/Noncopyable.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class FrameLifecycle { | 12 class FrameLifecycle { |
13 WTF_MAKE_NONCOPYABLE(FrameLifecycle); | 13 WTF_MAKE_NONCOPYABLE(FrameLifecycle); |
14 | 14 |
15 public: | 15 public: |
16 enum State { | 16 enum State { |
17 kAttached, | 17 kAttached, |
18 kDetaching, | 18 kDetaching, |
19 kDetached, | 19 kDetached, |
20 }; | 20 }; |
21 | 21 |
22 FrameLifecycle(); | 22 FrameLifecycle(); |
23 | 23 |
24 State GetState() const { return state_; } | 24 State GetState() const { return state_; } |
25 void AdvanceTo(State); | 25 void AdvanceTo(State); |
26 | 26 |
27 private: | 27 private: |
28 State state_; | 28 State state_; |
29 }; | 29 }; |
30 | 30 |
31 } // namespace blink | 31 } // namespace blink |
32 | 32 |
33 #endif // FrameLifecycle_h | 33 #endif // FrameLifecycle_h |
OLD | NEW |