// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_TYPES_H_ #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_TYPES_H_ #include <stdint.h> #include <memory> #include <set> #include <vector> #include "base/functional/callback.h" #include "components/offline_pages/core/offline_page_item.h" #include "components/offline_pages/core/offline_page_visuals.h" class GURL; // This file contains common callbacks used by OfflinePageModel and is a // temporary step to refactor and interface of the model out of the // implementation. namespace offline_pages { // Result of saving a page offline. Must be kept with sync with // OfflinePagesSavePageResult in metrics' enum.xml // A Java counterpart will be generated for this enum. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.offlinepages enum class SavePageResult { … }; // Result of adding an offline page. enum class AddPageResult { … }; // Result of deleting an offline page. Must be kept with sync with // OfflinePagesDeletePageResult in metrics' enum.xml. // A Java counterpart will be generated for this enum. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.offlinepages enum class DeletePageResult { … }; // The result when trying to share offline page to other apps. enum class ShareResult { … }; struct VisualsAvailability { … }; MultipleOfflineIdResult; MultipleOfflinePageItemResult; SavePageCallback; AddPageCallback; DeletePageCallback; MultipleOfflineIdCallback; SingleOfflinePageItemCallback; MultipleOfflinePageItemCallback; UrlPredicate; SizeInBytesCallback; GetVisualsCallback; CleanupVisualsCallback; // Callbacks used for publishing an offline page. PublishPageCallback; } // namespace offline_pages #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_TYPES_H_