Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / platform / ScriptForbiddenScope.h
blob9c3ba7e8f5dda74bb6ab5445c065f6fecf9b7b77
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
3 // found in the LICENSE file.
5 #ifndef ScriptForbiddenScope_h
6 #define ScriptForbiddenScope_h
8 #include "platform/PlatformExport.h"
9 #include "wtf/Assertions.h"
10 #include "wtf/Optional.h"
11 #include "wtf/TemporaryChange.h"
13 namespace blink {
15 class PLATFORM_EXPORT ScriptForbiddenScope {
16 public:
17 ScriptForbiddenScope();
18 ~ScriptForbiddenScope();
20 class PLATFORM_EXPORT AllowUserAgentScript {
21 public:
22 AllowUserAgentScript();
23 ~AllowUserAgentScript();
24 private:
25 Optional<TemporaryChange<unsigned>> m_change;
28 static void enter();
29 static void exit();
30 static bool isScriptForbidden();
33 } // namespace blink
35 #endif // ScriptForbiddenScope_h