Chromium Code Reviews| 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_ |