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

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: disallow await during provide 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
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 virtual void didAwaitStableState() = 0;
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698