Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / platform / modules / serviceworker / WebServiceWorkerClientsInfo.h
blob53dfa93a766eb10676ee90eace6c59f9ca3c272b
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 WebServiceWorkerClientsInfo_h
6 #define WebServiceWorkerClientsInfo_h
8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebPageVisibilityState.h"
10 #include "public/platform/WebPassOwnPtr.h"
11 #include "public/platform/WebServiceWorkerClientType.h"
12 #include "public/platform/WebURL.h"
13 #include "public/platform/WebURLRequest.h"
14 #include "public/platform/WebVector.h"
16 namespace blink {
18 struct WebServiceWorkerError;
20 struct WebServiceWorkerClientInfo {
21 WebServiceWorkerClientInfo()
22 : pageVisibilityState(WebPageVisibilityStateLast)
23 , isFocused(false)
24 , frameType(WebURLRequest::FrameTypeNone)
25 , clientType(WebServiceWorkerClientTypeWindow)
29 WebString uuid;
31 WebPageVisibilityState pageVisibilityState;
32 bool isFocused;
33 WebURL url;
34 WebURLRequest::FrameType frameType;
35 WebServiceWorkerClientType clientType;
38 struct WebServiceWorkerClientsInfo {
39 WebVector<WebServiceWorkerClientInfo> clients;
42 // Two WebCallbacks, one for one client, one for a WebVector of clients.
43 using WebServiceWorkerClientCallbacks = WebCallbacks<WebPassOwnPtr<WebServiceWorkerClientInfo>, const WebServiceWorkerError&>;
44 using WebServiceWorkerClientsCallbacks = WebCallbacks<const WebServiceWorkerClientsInfo&, const WebServiceWorkerError&>;
46 } // namespace blink
48 #endif // WebServiceWorkerClientsInfo_h