| Index: Source/core/dom/ExecutionContext.cpp
|
| diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp
|
| index 23f4accad5d1ef752360d1a3de5642ed6c069d92..b3c60b7a26304807f54c5c00a1dbc128e4f9caa5 100644
|
| --- a/Source/core/dom/ExecutionContext.cpp
|
| +++ b/Source/core/dom/ExecutionContext.cpp
|
| @@ -73,6 +73,7 @@ ExecutionContext::ExecutionContext()
|
| , m_inDispatchErrorEvent(false)
|
| , m_activeDOMObjectsAreSuspended(false)
|
| , m_activeDOMObjectsAreStopped(false)
|
| + , m_windowFocusToken(0)
|
| {
|
| }
|
|
|
| @@ -267,6 +268,23 @@ void ExecutionContext::enforceSandboxFlags(SandboxFlags mask)
|
| }
|
| }
|
|
|
| +void ExecutionContext::giveWindowFocusToken()
|
| +{
|
| + ++m_windowFocusToken;
|
| +}
|
| +
|
| +void ExecutionContext::consumeWindowFocusToken()
|
| +{
|
| + if (m_windowFocusToken == 0)
|
| + return;
|
| + --m_windowFocusToken;
|
| +}
|
| +
|
| +bool ExecutionContext::isWindowFocusAllowed() const
|
| +{
|
| + return m_windowFocusToken > 0;
|
| +}
|
| +
|
| void ExecutionContext::trace(Visitor* visitor)
|
| {
|
| #if ENABLE(OILPAN)
|
|
|