| 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/WebURL.h" | 10 #include "public/platform/WebURL.h" |
| 10 #include "public/platform/WebURLRequest.h" | 11 #include "public/platform/WebURLRequest.h" |
| 11 #include "public/platform/WebVector.h" | 12 #include "public/platform/WebVector.h" |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 struct WebServiceWorkerError; | 16 struct WebServiceWorkerError; |
| 16 | 17 |
| 17 struct WebServiceWorkerClientInfo { | 18 struct WebServiceWorkerClientInfo { |
| 18 WebServiceWorkerClientInfo() | 19 WebServiceWorkerClientInfo() |
| 19 : clientID(0) | 20 : clientID(0) |
| 21 , pageVisibilityState(WebPageVisibilityStateLast) |
| 20 , isFocused(false) | 22 , isFocused(false) |
| 21 , frameType(WebURLRequest::FrameTypeNone) | 23 , frameType(WebURLRequest::FrameTypeNone) |
| 22 { | 24 { |
| 23 } | 25 } |
| 24 | 26 |
| 25 int clientID; | 27 int clientID; |
| 26 // FIXME: Use WebPageVisibilityState? That will require moving | 28 // FIXME: remove when the Chromium code will be updated. |
| 27 // WebPageVisibilityState from public/web to public/platform. | |
| 28 WebString visibilityState; | 29 WebString visibilityState; |
| 30 WebPageVisibilityState pageVisibilityState; |
| 29 bool isFocused; | 31 bool isFocused; |
| 30 WebURL url; | 32 WebURL url; |
| 31 WebURLRequest::FrameType frameType; | 33 WebURLRequest::FrameType frameType; |
| 32 }; | 34 }; |
| 33 | 35 |
| 34 struct WebServiceWorkerClientsInfo { | 36 struct WebServiceWorkerClientsInfo { |
| 35 WebVector<WebServiceWorkerClientInfo> clients; | 37 WebVector<WebServiceWorkerClientInfo> clients; |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 typedef WebCallbacks<WebServiceWorkerClientsInfo, WebServiceWorkerError> WebServ
iceWorkerClientsCallbacks; | 40 typedef WebCallbacks<WebServiceWorkerClientsInfo, WebServiceWorkerError> WebServ
iceWorkerClientsCallbacks; |
| 39 | 41 |
| 40 } // namespace blink | 42 } // namespace blink |
| 41 | 43 |
| 42 #endif // WebServiceWorkerClientsInfo_h | 44 #endif // WebServiceWorkerClientsInfo_h |
| OLD | NEW |