OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 WebSyncRegistration_h |
| 6 #define WebSyncRegistration_h |
| 7 |
| 8 #include "public/platform/WebPrivatePtr.h" |
| 9 #include "public/platform/WebString.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 struct WebSyncRegistrationOptions { |
| 14 enum NetworkType { |
| 15 NetworkTypeAny = 0, |
| 16 NetworkTypeOffline, |
| 17 NetworkTypeOnline, |
| 18 NetworkTypeNonMobile, |
| 19 NetworkTypeLast = NetworkTypeNonMobile |
| 20 }; |
| 21 |
| 22 WebSyncRegistrationOptions(NetworkType networkType, bool allowOnBattery, boo
l idleRequired) |
| 23 : networkType(networkType) |
| 24 , allowOnBattery(allowOnBattery) |
| 25 , idleRequired(idleRequired) |
| 26 { |
| 27 } |
| 28 |
| 29 NetworkType networkType; |
| 30 bool allowOnBattery; |
| 31 bool idleRequired; |
| 32 }; |
| 33 |
| 34 |
| 35 struct WebSyncRegistration { |
| 36 WebSyncRegistration(const WebString& registrationId, const WebSyncRegistrati
onOptions& options) |
| 37 : id(registrationId) |
| 38 , options(options) |
| 39 { |
| 40 } |
| 41 |
| 42 WebString id; |
| 43 WebSyncRegistrationOptions options; |
| 44 }; |
| 45 |
| 46 } // namespace blink |
| 47 |
| 48 #endif // WebSyncRegistration_h |
OLD | NEW |