| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebServiceWorkerClientsInfo_h | 5 #ifndef WebServiceWorkerClientsInfo_h |
| 6 #define WebServiceWorkerClientsInfo_h | 6 #define WebServiceWorkerClientsInfo_h |
| 7 | 7 |
| 8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
| 9 #include "public/platform/WebPageVisibilityState.h" | 9 #include "public/platform/WebPageVisibilityState.h" |
| 10 #include "public/platform/WebServiceWorkerClientType.h" | 10 #include "public/platform/WebServiceWorkerClientType.h" |
| 11 #include "public/platform/WebURL.h" | 11 #include "public/platform/WebURL.h" |
| 12 #include "public/platform/WebURLRequest.h" | 12 #include "public/platform/WebURLRequest.h" |
| 13 #include "public/platform/WebVector.h" | 13 #include "public/platform/WebVector.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 struct WebServiceWorkerError; | 17 struct WebServiceWorkerError; |
| 18 | 18 |
| 19 struct WebServiceWorkerClientInfo { | 19 struct WebServiceWorkerClientInfo { |
| 20 WebServiceWorkerClientInfo() | 20 WebServiceWorkerClientInfo() |
| 21 : clientID(0) | 21 : clientID(0) |
| 22 , pageVisibilityState(WebPageVisibilityStateLast) | 22 , pageVisibilityState(WebPageVisibilityStateLast) |
| 23 , isFocused(false) | 23 , isFocused(false) |
| 24 , frameType(WebURLRequest::FrameTypeNone) | 24 , frameType(WebURLRequest::FrameTypeNone) |
| 25 , clientType(WebServiceWorkerClientTypeWindow) | 25 , clientType(WebServiceWorkerClientTypeWindow) |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 | 28 |
| 29 int clientID; | 29 int clientID; // FIXME: Deprecate this when we switch to UUID. |
| 30 WebString uuid; |
| 30 | 31 |
| 31 WebPageVisibilityState pageVisibilityState; | 32 WebPageVisibilityState pageVisibilityState; |
| 32 bool isFocused; | 33 bool isFocused; |
| 33 WebURL url; | 34 WebURL url; |
| 34 WebURLRequest::FrameType frameType; | 35 WebURLRequest::FrameType frameType; |
| 35 WebServiceWorkerClientType clientType; | 36 WebServiceWorkerClientType clientType; |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 struct WebServiceWorkerClientsInfo { | 39 struct WebServiceWorkerClientsInfo { |
| 39 WebVector<WebServiceWorkerClientInfo> clients; | 40 WebVector<WebServiceWorkerClientInfo> clients; |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 // Two WebCallbacks, one for one client, one for a WebVector of clients. | 43 // Two WebCallbacks, one for one client, one for a WebVector of clients. |
| 43 typedef WebCallbacks<WebServiceWorkerClientInfo, WebServiceWorkerError> WebServi
ceWorkerClientCallbacks; | 44 typedef WebCallbacks<WebServiceWorkerClientInfo, WebServiceWorkerError> WebServi
ceWorkerClientCallbacks; |
| 44 typedef WebCallbacks<WebServiceWorkerClientsInfo, WebServiceWorkerError> WebServ
iceWorkerClientsCallbacks; | 45 typedef WebCallbacks<WebServiceWorkerClientsInfo, WebServiceWorkerError> WebServ
iceWorkerClientsCallbacks; |
| 45 | 46 |
| 46 } // namespace blink | 47 } // namespace blink |
| 47 | 48 |
| 48 #endif // WebServiceWorkerClientsInfo_h | 49 #endif // WebServiceWorkerClientsInfo_h |
| OLD | NEW |