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

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

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 | « no previous file | Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ExecutionContext.h
diff --git a/Source/core/dom/ExecutionContext.h b/Source/core/dom/ExecutionContext.h
index e3ffc1a737a5c174d64ea71101386d9184d21169..8cf19d28937e166bd79fd03fb40ab2c78e18cb57 100644
--- a/Source/core/dom/ExecutionContext.h
+++ b/Source/core/dom/ExecutionContext.h
@@ -130,9 +130,11 @@ public:
void enforceStrictMixedContentChecking() { m_strictMixedContentCheckingEnforced = true; }
bool shouldEnforceStrictMixedContentChecking() const { return m_strictMixedContentCheckingEnforced; }
- void allowWindowFocus();
- void consumeWindowFocus();
- bool isWindowFocusAllowed() const;
+ // Methods related to window interaction. It should be used to manage window
+ // focusing and window creation permission for an ExecutionContext.
+ void allowWindowInteraction();
+ void consumeWindowInteraction();
+ bool isWindowInteractionAllowed() const;
protected:
ExecutionContext();
@@ -167,11 +169,11 @@ private:
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;
+ // Counter that keeps track of how many window interaction calls are allowed
+ // for this ExecutionContext. Callers are expected to call
+ // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
+ // increment and decrement the counter.
+ int m_windowInteractionTokens;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698