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

Unified Diff: Source/core/dom/ExecutionContext.cpp

Issue 803253003: Revert of Bind Window focus ability to the ExecutionContext instead of the process. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sw_client_focus
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/ScopedWindowFocusAllowedIndicator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ExecutionContext.cpp
diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp
index 240a99d3fe3675b87db24d68d3a251f68b9a4435..887f2e70ee4a597c20c5fe8596055cf0084bb9fb 100644
--- a/Source/core/dom/ExecutionContext.cpp
+++ b/Source/core/dom/ExecutionContext.cpp
@@ -36,7 +36,6 @@
#include "core/html/PublicURLManager.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/ScriptCallStack.h"
-#include "core/page/WindowFocusAllowedIndicator.h"
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerThread.h"
#include "wtf/MainThread.h"
@@ -74,7 +73,6 @@
, m_inDispatchErrorEvent(false)
, m_activeDOMObjectsAreSuspended(false)
, m_activeDOMObjectsAreStopped(false)
- , m_windowFocusTokens(0)
{
}
@@ -271,26 +269,6 @@
securityContext().setSecurityOrigin(SecurityOrigin::createUnique());
didUpdateSecurityOrigin();
}
-}
-
-void ExecutionContext::allowWindowFocus()
-{
- ++m_windowFocusTokens;
-}
-
-void ExecutionContext::consumeWindowFocus()
-{
- if (m_windowFocusTokens == 0)
- return;
- --m_windowFocusTokens;
-}
-
-bool ExecutionContext::isWindowFocusAllowed() const
-{
- // FIXME: WindowFocusAllowedIndicator::windowFocusAllowed() is temporary,
- // it will be removed as soon as WebScopedWindowFocusAllowedIndicator will
- // be updated to not use WindowFocusAllowedIndicator.
- return m_windowFocusTokens > 0 || WindowFocusAllowedIndicator::windowFocusAllowed();
}
void ExecutionContext::trace(Visitor* visitor)
« no previous file with comments | « Source/core/dom/ExecutionContext.h ('k') | Source/core/dom/ScopedWindowFocusAllowedIndicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698