OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef StableState_h | |
6 #define StableState_h | |
7 | |
8 namespace WebCore { | |
9 | |
10 class StableState { | |
11 public: | |
12 class Awaiter { | |
13 public: | |
14 virtual ~Awaiter(); | |
15 virtual void didAwaitStableState() = 0; | |
acolwell GONE FROM CHROMIUM
2014/02/10 22:36:05
nit: didAwaitStableState seems like an awkward nam
philipj_slow
2014/02/11 17:25:21
I rather like my name, actually, it blends well wi
acolwell GONE FROM CHROMIUM
2014/02/18 18:47:42
You're right. I retract my objection. I'm fine wit
| |
16 }; | |
17 | |
18 // Await a stable state. Adding the same awaiter again has no effect. The | |
19 // only way to stop awaiting a stable state is to delete the awaiter. | |
20 // | |
21 // http://whatwg.org/html#await-a-stable-state | |
22 static void await(Awaiter&); | |
23 | |
24 // Provide a stable state. Each awaiter will be notified once and then | |
25 // forgotten. Calling await() inside the callback is not allowed. | |
26 // | |
27 // http://whatwg.org/html#provide-a-stable-state | |
28 static void provide(); | |
29 | |
30 private: | |
31 explicit StableState(); | |
32 }; | |
33 | |
34 } | |
35 | |
36 #endif // StableState_h | |
OLD | NEW |