| Index: Source/core/html/StableState.h
|
| diff --git a/Source/core/html/StableState.h b/Source/core/html/StableState.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..764cdd5c3ab6d9ec0acf892b0a1cf9ad17caa884
|
| --- /dev/null
|
| +++ b/Source/core/html/StableState.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef StableState_h
|
| +#define StableState_h
|
| +
|
| +namespace WebCore {
|
| +
|
| +class StableState {
|
| +public:
|
| + class Awaiter {
|
| + public:
|
| + virtual ~Awaiter();
|
| + virtual void didAwaitStableState() = 0;
|
| + };
|
| +
|
| + // Await a stable state. Adding the same awaiter again has no effect. The
|
| + // only way to stop awaiting a stable state is to delete the awaiter.
|
| + //
|
| + // http://whatwg.org/html#await-a-stable-state
|
| + static void await(Awaiter&);
|
| +
|
| + // Provide a stable state. Each awaiter will be notified once and then
|
| + // forgotten. Calling await() inside the callback is not allowed.
|
| + //
|
| + // http://whatwg.org/html#provide-a-stable-state
|
| + static void provide();
|
| +
|
| +private:
|
| + explicit StableState();
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif // StableState_h
|
|
|