summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h')
-rw-r--r--Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h b/Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
index 6f1367354..379efd204 100644
--- a/Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
+++ b/Source/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
@@ -23,16 +23,15 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebFramePolicyListenerProxy_h
-#define WebFramePolicyListenerProxy_h
+#pragma once
#include "WebFrameListenerProxy.h"
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include "WKFoundation.h"
#endif
-#define DELEGATE_REF_COUNTING_TO_COCOA (PLATFORM(MAC) && WK_API_ENABLED)
+#define DELEGATE_REF_COUNTING_TO_COCOA (PLATFORM(COCOA) && WK_API_ENABLED)
namespace WebKit {
@@ -40,19 +39,19 @@ class WebFramePolicyListenerProxy : public WebFrameListenerProxy {
public:
static const Type APIType = Type::FramePolicyListener;
- static PassRefPtr<WebFramePolicyListenerProxy> create(WebFrameProxy* frame, uint64_t listenerID)
+ static Ref<WebFramePolicyListenerProxy> create(WebFrameProxy* frame, uint64_t listenerID)
{
- return adoptRef(new WebFramePolicyListenerProxy(frame, listenerID));
+ return adoptRef(*new WebFramePolicyListenerProxy(frame, listenerID));
}
- void use();
+ void use(const WebsitePolicies&);
void download();
void ignore();
private:
WebFramePolicyListenerProxy(WebFrameProxy*, uint64_t listenerID);
- virtual Type type() const { return APIType; }
+ Type type() const override { return APIType; }
#if DELEGATE_REF_COUNTING_TO_COCOA
void* operator new(size_t size) { return newObject(size, APIType); }
@@ -62,5 +61,3 @@ private:
} // namespace WebKit
#undef DELEGATE_REF_COUNTING_TO_COCOA
-
-#endif // WebFramePolicyListenerProxy_h