Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h

Issue 2239133002: [Offline pages] Downloads UI: Adding bridge for issuing notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@download-notifications
Patch Set: Addressing CR feedback Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h
diff --git a/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h b/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..840dfa57aa08f64754356e4d21e18b86d0910db8
--- /dev/null
+++ b/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h
@@ -0,0 +1,34 @@
+// Copyright 2016 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 CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_OFFLINE_PAGE_NOTIFICATION_BRIDGE_H_
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_OFFLINE_PAGE_NOTIFICATION_BRIDGE_H_
+
+#include <stdint.h>
+
+#include "base/android/jni_android.h"
+#include "base/macros.h"
+#include "components/offline_pages/downloads/offline_page_download_notifier.h"
+
+namespace offline_pages {
+namespace android {
+
+// Bridge for offline page related keyed services to issue download
+// notifications in Android.
+class OfflinePageNotificationBridge : public OfflinePageDownloadNotifier {
+ public:
+ ~OfflinePageNotificationBridge() override {}
+
+ void NotifyDownloadSuccessful(const DownloadUIItem& item) override;
+ void NotifyDownloadFailed(const DownloadUIItem& item) override;
+ void NotifyDownloadProgress(const DownloadUIItem& item) override;
+ void NotifyDownloadPaused(const DownloadUIItem& item) override;
+ void NotifyDownloadInterrupted(const DownloadUIItem& item) override;
+ void NotifyDownloadCanceled(const DownloadUIItem& item) override;
+};
+
+} // namespace android
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_DOWNLOADS_OFFLINE_PAGE_NOTIFICATION_BRIDGE_H_

Powered by Google App Engine
This is Rietveld 408576698