Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / ContextMenuAllowedScope.cpp
blob0022bed5571da15c68ab7a9a7959bf26bc1df64f
1 // Copyright 2015 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 #include "config.h"
6 #include "ContextMenuAllowedScope.h"
8 namespace blink {
10 static unsigned s_ContextMenuAllowedCount = 0;
12 ContextMenuAllowedScope::ContextMenuAllowedScope()
14 s_ContextMenuAllowedCount++;
17 ContextMenuAllowedScope::~ContextMenuAllowedScope()
19 s_ContextMenuAllowedCount--;
22 bool ContextMenuAllowedScope::isContextMenuAllowed()
24 return s_ContextMenuAllowedCount;
27 } // namespace blink