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

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

Issue 866983004: Allow creating new windows from a notificationclick event in SW. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 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 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 9f0f684a38618eda54c024f8c1ef468c62082023..173442ae572b6ee27003a69c43e93b88f3f767d0 100644
--- a/Source/core/dom/ExecutionContext.cpp
+++ b/Source/core/dom/ExecutionContext.cpp
@@ -72,7 +72,7 @@ ExecutionContext::ExecutionContext()
, m_activeDOMObjectsAreSuspended(false)
, m_activeDOMObjectsAreStopped(false)
, m_strictMixedContentCheckingEnforced(false)
- , m_windowFocusTokens(0)
+ , m_windowInteractionTokens(0)
{
}
@@ -226,24 +226,24 @@ bool ExecutionContext::isIteratingOverObservers() const
return m_lifecycleNotifier && m_lifecycleNotifier->isIteratingOverObservers();
}
-void ExecutionContext::allowWindowFocus()
+void ExecutionContext::allowWindowInteraction()
{
- ++m_windowFocusTokens;
+ ++m_windowInteractionTokens;
}
-void ExecutionContext::consumeWindowFocus()
+void ExecutionContext::consumeWindowInteraction()
{
- if (m_windowFocusTokens == 0)
+ if (m_windowInteractionTokens == 0)
return;
- --m_windowFocusTokens;
+ --m_windowInteractionTokens;
}
-bool ExecutionContext::isWindowFocusAllowed() const
+bool ExecutionContext::isWindowInteractionAllowed() 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();
+ return m_windowInteractionTokens > 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