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

Unified Diff: content/browser/background_fetch/background_fetch_client_proxy.h

Issue 2777063008: Connect BackgroundFetch to the OfflineItemCollection
Patch Set: Added BackgroundFetchClientProxy to proxy calls to and from the Context. Created 3 years, 9 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: content/browser/background_fetch/background_fetch_client_proxy.h
diff --git a/content/browser/background_fetch/background_fetch_client_proxy.h b/content/browser/background_fetch/background_fetch_client_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7e50760973541089f99b1d04c11a5989f2d9e1e
--- /dev/null
+++ b/content/browser/background_fetch/background_fetch_client_proxy.h
@@ -0,0 +1,39 @@
+// Copyright 2017 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_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CLIENT_PROXY_H_
+#define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CLIENT_PROXY_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "content/public/browser/background_fetch_client.h"
+
+namespace content {
+
+class BackgroundFetchContext;
+
+// The BackgroundFetchClientProxy exists to proxy calls from the
+// BackgroundFetchContext, which lives on the IO thread, to the
+// BackgroundFetchClient which lives on the UI thread and back through the
+// BackgroundFetchClient::Delegate.
+class CONTENT_EXPORT BackgroundFetchClientProxy
+ : public BackgroundFetchClient::Delegate {
+ public:
+ BackgroundFetchClientProxy(BackgroundFetchContext* context);
Peter Beverloo 2017/03/31 01:32:23 explicit
harkness 2017/03/31 10:11:44 Done.
+ ~BackgroundFetchClientProxy() override;
+
+ // BackgroundFetchClient::Delegate implementation.
+ void CancelDownload(const std::string& registration_id) override;
+ void PauseDownload(const std::string& registration_id) override;
+ void ResumeDownload(const std::string& registration_id) override;
+
+ private:
+ // The BackgroundFetchClientProxy is owned by the BackgroundFetchContext.
+ BackgroundFetchContext* background_fetch_context_;
+};
Peter Beverloo 2017/03/31 01:32:23 DISALLOW_COPY_AND_ASSIGN
harkness 2017/03/31 10:11:44 Done.
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_CLIENT_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698