K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2016 The PDFium Authors |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Tom Sepez | 269f2ae | 2019-08-20 19:31:17 +0000 | [diff] [blame] | 7 | #ifndef FPDFSDK_CPDFSDK_PAUSEADAPTER_H_ |
| 8 | #define FPDFSDK_CPDFSDK_PAUSEADAPTER_H_ |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 9 | |
Dan Sinclair | a32145f | 2018-03-06 18:53:05 +0000 | [diff] [blame] | 10 | #include "core/fxcrt/pauseindicator_iface.h" |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 11 | #include "core/fxcrt/unowned_ptr.h" |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 12 | #include "public/fpdf_progressive.h" |
| 13 | |
Tom Sepez | 269f2ae | 2019-08-20 19:31:17 +0000 | [diff] [blame] | 14 | class CPDFSDK_PauseAdapter final : public PauseIndicatorIface { |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 15 | public: |
Tom Sepez | 269f2ae | 2019-08-20 19:31:17 +0000 | [diff] [blame] | 16 | explicit CPDFSDK_PauseAdapter(IFSDK_PAUSE* IPause); |
| 17 | ~CPDFSDK_PauseAdapter() override; |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 18 | |
tsepez | 4cf5515 | 2016-11-02 14:37:54 -0700 | [diff] [blame] | 19 | bool NeedToPauseNow() override; |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 20 | |
| 21 | private: |
Dan Sinclair | aee0db0 | 2017-09-21 16:53:58 -0400 | [diff] [blame] | 22 | UnownedPtr<IFSDK_PAUSE> const m_IPause; |
weili | 9f515bc | 2016-07-24 08:08:24 -0700 | [diff] [blame] | 23 | }; |
| 24 | |
Tom Sepez | 269f2ae | 2019-08-20 19:31:17 +0000 | [diff] [blame] | 25 | #endif // FPDFSDK_CPDFSDK_PAUSEADAPTER_H_ |