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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScopedWindowFocusAllowedIndicator.h

Issue 2812013004: Rewrite references to "wtf/" to "platform/wtf/" in core/{dom,html,xml}. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ScopedWindowFocusAllowedIndicator_h 5 #ifndef ScopedWindowFocusAllowedIndicator_h
6 #define ScopedWindowFocusAllowedIndicator_h 6 #define ScopedWindowFocusAllowedIndicator_h
7 7
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "wtf/Noncopyable.h" 9 #include "platform/wtf/Noncopyable.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ScopedWindowFocusAllowedIndicator final { 13 class ScopedWindowFocusAllowedIndicator final {
14 USING_FAST_MALLOC(ScopedWindowFocusAllowedIndicator); 14 USING_FAST_MALLOC(ScopedWindowFocusAllowedIndicator);
15 WTF_MAKE_NONCOPYABLE(ScopedWindowFocusAllowedIndicator); 15 WTF_MAKE_NONCOPYABLE(ScopedWindowFocusAllowedIndicator);
16 16
17 public: 17 public:
18 explicit ScopedWindowFocusAllowedIndicator( 18 explicit ScopedWindowFocusAllowedIndicator(
19 ExecutionContext* execution_context) 19 ExecutionContext* execution_context)
20 : execution_context_(execution_context) { 20 : execution_context_(execution_context) {
21 execution_context->AllowWindowInteraction(); 21 execution_context->AllowWindowInteraction();
22 } 22 }
23 ~ScopedWindowFocusAllowedIndicator() { 23 ~ScopedWindowFocusAllowedIndicator() {
24 execution_context_->ConsumeWindowInteraction(); 24 execution_context_->ConsumeWindowInteraction();
25 } 25 }
26 26
27 private: 27 private:
28 // This doesn't create a cycle because ScopedWindowFocusAllowedIndicator 28 // This doesn't create a cycle because ScopedWindowFocusAllowedIndicator
29 // is used only on a machine stack. 29 // is used only on a machine stack.
30 Persistent<ExecutionContext> execution_context_; 30 Persistent<ExecutionContext> execution_context_;
31 }; 31 };
32 32
33 } // namespace blink 33 } // namespace blink
34 34
35 #endif // ScopedWindowFocusAllowedIndicator_h 35 #endif // ScopedWindowFocusAllowedIndicator_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/SandboxFlags.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptElementBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698