Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / platform / ContentSettingCallbacks.h
blob5e130d2097c2b4919b6b051de04702c7920e3a38
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 ContentSettingCallbacks_h
6 #define ContentSettingCallbacks_h
8 #include "platform/PlatformExport.h"
9 #include "wtf/Functional.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/OwnPtr.h"
12 #include "wtf/PassOwnPtr.h"
14 namespace blink {
16 class PLATFORM_EXPORT ContentSettingCallbacks {
17 WTF_MAKE_NONCOPYABLE(ContentSettingCallbacks);
18 public:
19 static PassOwnPtr<ContentSettingCallbacks> create(PassOwnPtr<Closure> allowed, PassOwnPtr<Closure> denied);
20 virtual ~ContentSettingCallbacks() { }
22 void onAllowed() { (*m_allowed)(); }
23 void onDenied() { (*m_denied)(); }
25 private:
26 ContentSettingCallbacks(PassOwnPtr<Closure> allowed, PassOwnPtr<Closure> denied);
28 OwnPtr<Closure> m_allowed;
29 OwnPtr<Closure> m_denied;
32 } // namespace blink
34 #endif // ContentSettingCallbacks_h