Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: Source/core/html/StableState.h

Issue 153813002: Support "await a stable state" and "provide a stable state" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/StableState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // Invoked by provide(). An awaiter may delete itself in the callback,
16 // but must not delete any other awaiter or call await() or provide().
17 virtual void didAwaitStableState() = 0;
18 };
19
20 // Await a stable state. Adding the same awaiter again has no effect. The
21 // only way to stop awaiting a stable state is to delete the awaiter.
22 //
23 // http://whatwg.org/html#await-a-stable-state
24 static void await(Awaiter&);
25
26 // Provide a stable state. Each awaiter will be notified once and then
27 // forgotten.
28 //
29 // http://whatwg.org/html#provide-a-stable-state
30 static void provide();
31
32 private:
33 explicit StableState();
34 };
35
36 }
37
38 #endif // StableState_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/StableState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698