| Index: Source/core/dom/ExecutionContext.h
|
| diff --git a/Source/core/dom/ExecutionContext.h b/Source/core/dom/ExecutionContext.h
|
| index daf2172090d2ffd8344f385334d5884f0d19988c..95423dac7bdb8d6d53b428087ed9f9d93e75008d 100644
|
| --- a/Source/core/dom/ExecutionContext.h
|
| +++ b/Source/core/dom/ExecutionContext.h
|
| @@ -136,6 +136,10 @@ public:
|
| void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnforced = true; }
|
| bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedContentCheckingEnforced; }
|
|
|
| + void allowWindowFocus();
|
| + void consumeWindowFocus();
|
| + bool isWindowFocusAllowed() const;
|
| +
|
| protected:
|
| ExecutionContext();
|
| virtual ~ExecutionContext();
|
| @@ -182,6 +186,12 @@ private:
|
| // ExecutionContext's members (notably m_timeouts) is called before they are destructed,
|
| // m_lifecycleNotifer should be placed *after* such members.
|
| OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier;
|
| +
|
| + // Counter that keeps track of how many window focus calls are allowed for
|
| + // this ExecutionContext. Callers are expected to call |allowWindowFocus()|
|
| + // and |consumeWindowFocus()| in order to increment and decrement the
|
| + // counter.
|
| + int m_windowFocusTokens;
|
| };
|
|
|
| } // namespace blink
|
|
|