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"
16 class PLATFORM_EXPORT ContentSettingCallbacks
{
17 WTF_MAKE_NONCOPYABLE(ContentSettingCallbacks
);
19 static PassOwnPtr
<ContentSettingCallbacks
> create(PassOwnPtr
<Closure
> allowed
, PassOwnPtr
<Closure
> denied
);
20 virtual ~ContentSettingCallbacks() { }
22 void onAllowed() { (*m_allowed
)(); }
23 void onDenied() { (*m_denied
)(); }
26 ContentSettingCallbacks(PassOwnPtr
<Closure
> allowed
, PassOwnPtr
<Closure
> denied
);
28 OwnPtr
<Closure
> m_allowed
;
29 OwnPtr
<Closure
> m_denied
;
34 #endif // ContentSettingCallbacks_h