Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / public / platform / WebPushClient.h
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.
4
5 #ifndef WebPushClient_h
6 #define WebPushClient_h
7
8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebPushError.h"
10 #include "public/platform/WebPushPermissionStatus.h"
11
12 namespace blink {
13
14 class WebServiceWorkerProvider;
15 struct WebPushRegistration;
16
17 typedef WebCallbacks<WebPushRegistration, WebPushError> WebPushRegistrationCallbacks;
18 typedef WebCallbacks<WebPushPermissionStatus, void> WebPushPermissionStatusCallback;
19
20 class WebPushClient {
21 public:
22     virtual ~WebPushClient() { }
23
24     // Ownership of the WebPushRegistrationCallbacks is transferred to the
25     // client. Ownership of the WebServiceWorkerProvider is not transferred.
26     virtual void registerPushMessaging(WebPushRegistrationCallbacks*, WebServiceWorkerProvider*) { }
27
28     // Ownership of the WebPushPermissionStatusCallback is transferred to the
29     // client. Ownership of the WebServiceWorkerProvider is not transferred.
30     virtual void getPermissionStatus(WebPushPermissionStatusCallback*, WebServiceWorkerProvider*) { }
31 };
32
33 } // namespace blink
34
35 #endif // WebPushClient_h