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"
15 class PLATFORM_EXPORT ScriptForbiddenScope
{
17 ScriptForbiddenScope();
18 ~ScriptForbiddenScope();
20 class PLATFORM_EXPORT AllowUserAgentScript
{
22 AllowUserAgentScript();
23 ~AllowUserAgentScript();
25 Optional
<TemporaryChange
<unsigned>> m_change
;
30 static bool isScriptForbidden();
35 #endif // ScriptForbiddenScope_h