Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / platform / WebContentSettingCallbacks.h
blobd5ed0a6759e2e625eb1403e8dddd3efe135231db
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 #ifndef WebContentSettingCallbacks_h
6 #define WebContentSettingCallbacks_h
8 #include "WebPrivatePtr.h"
10 namespace WTF { template <typename T> class PassOwnPtr; }
12 namespace blink {
14 class ContentSettingCallbacks;
15 class WebContentSettingCallbacksPrivate;
17 class WebContentSettingCallbacks {
18 public:
19 ~WebContentSettingCallbacks() { reset(); }
20 WebContentSettingCallbacks() { }
21 WebContentSettingCallbacks(const WebContentSettingCallbacks& c) { assign(c); }
22 WebContentSettingCallbacks& operator=(const WebContentSettingCallbacks& c)
24 assign(c);
25 return *this;
28 BLINK_PLATFORM_EXPORT void reset();
29 BLINK_PLATFORM_EXPORT void assign(const WebContentSettingCallbacks&);
31 #if INSIDE_BLINK
32 BLINK_PLATFORM_EXPORT WebContentSettingCallbacks(const WTF::PassOwnPtr<ContentSettingCallbacks>&);
33 #endif
35 BLINK_PLATFORM_EXPORT void doAllow();
36 BLINK_PLATFORM_EXPORT void doDeny();
38 private:
39 WebPrivatePtr<WebContentSettingCallbacksPrivate> m_private;
42 } // namespace blink
44 #endif