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

Unified Diff: Source/web/WebScopedWindowFocusAllowedIndicator.cpp

Issue 777483004: 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: rebase 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
Index: Source/web/WebScopedWindowFocusAllowedIndicator.cpp
diff --git a/Source/web/WebScopedWindowFocusAllowedIndicator.cpp b/Source/web/WebScopedWindowFocusAllowedIndicator.cpp
index 5b2e83aad5962b385e98c132d2bd4b8239c4ac4f..26239b6f59c0d2c221a237fd00ac198fae8a9cd8 100644
--- a/Source/web/WebScopedWindowFocusAllowedIndicator.cpp
+++ b/Source/web/WebScopedWindowFocusAllowedIndicator.cpp
@@ -31,10 +31,20 @@
#include "config.h"
#include "public/web/WebScopedWindowFocusAllowedIndicator.h"
+#include "core/dom/Document.h"
+#include "core/dom/ScopedWindowFocusAllowedIndicator.h"
#include "core/page/WindowFocusAllowedIndicator.h"
+#include "public/web/WebDocument.h"
namespace blink {
+void WebScopedWindowFocusAllowedIndicator::initialize(WebDocument* webDocument)
+{
+ Document* document = webDocument->unwrap<Document>();
+ ASSERT(document);
+ m_private.reset(new ScopedWindowFocusAllowedIndicator(document));
+}
+
void WebScopedWindowFocusAllowedIndicator::initialize()
{
m_indicator.reset(new WindowFocusAllowedIndicator());
@@ -43,6 +53,7 @@ void WebScopedWindowFocusAllowedIndicator::initialize()
void WebScopedWindowFocusAllowedIndicator::reset()
{
m_indicator.reset(0);
+ m_private.reset(0);
}
} // namespace blink
« no previous file with comments | « Source/modules/serviceworkers/WaitUntilObserver.cpp ('k') | Source/web/tests/WebScopedWindowFocusAllowedIndicatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698