// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_TYPE_CONVERTERS_H_ #define CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_TYPE_CONVERTERS_H_ #include "base/memory/scoped_ptr.h" #include "content/common/background_sync_service.mojom.h" #include "content/common/content_export.h" #include "mojo/public/cpp/bindings/type_converter.h" #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncError.h" #include "third_party/WebKit/public/platform/modules/background_sync/WebSyncRegistration.h" #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h" namespace mojo { // blink::WebSyncRegistration::NetworkState <=> // content::BackgroundSyncNetworkState template <> struct CONTENT_EXPORT TypeConverter { static blink::WebSyncRegistration::NetworkState Convert( content::BackgroundSyncNetworkState input); }; template <> struct CONTENT_EXPORT TypeConverter { static content::BackgroundSyncNetworkState Convert( blink::WebSyncRegistration::NetworkState input); }; // blink::WebSyncRegistration <=> // content::SyncRegistration template <> struct CONTENT_EXPORT TypeConverter, content::SyncRegistrationPtr> { static scoped_ptr Convert( const content::SyncRegistrationPtr& input); }; template <> struct CONTENT_EXPORT TypeConverter { static content::SyncRegistrationPtr Convert( const blink::WebSyncRegistration& input); }; // blink::WebServiceWorkerContextProxy::LastChanceOption <=> // content::BackgroundSyncEventLastChance template <> struct CONTENT_EXPORT TypeConverter { static blink::WebServiceWorkerContextProxy::LastChanceOption Convert( content::BackgroundSyncEventLastChance input); }; template <> struct CONTENT_EXPORT TypeConverter { static content::BackgroundSyncEventLastChance Convert( blink::WebServiceWorkerContextProxy::LastChanceOption input); }; } // namespace mojo #endif // CONTENT_CHILD_BACKGROUND_SYNC_BACKGROUND_SYNC_TYPE_CONVERTERS_H_