| 1 | // Aseprite |
| 2 | // Copyright (C) 2020-2021 Igara Studio S.A. |
| 3 | // Copyright (C) 2001-2018 David Capello |
| 4 | // |
| 5 | // This program is distributed under the terms of |
| 6 | // the End-User License Agreement for Aseprite. |
| 7 | |
| 8 | #ifndef APP_SEND_CRASH_H_INCLUDED |
| 9 | #define APP_SEND_CRASH_H_INCLUDED |
| 10 | #pragma once |
| 11 | |
| 12 | #include "app/notification_delegate.h" |
| 13 | #include "app/task.h" |
| 14 | |
| 15 | #include <string> |
| 16 | |
| 17 | namespace app { |
| 18 | |
| 19 | #if !ENABLE_SENTRY |
| 20 | |
| 21 | class SendCrash |
| 22 | #ifdef ENABLE_UI |
| 23 | : public INotificationDelegate |
| 24 | #endif |
| 25 | { |
| 26 | public: |
| 27 | static std::string DefaultMemoryDumpFilename(); |
| 28 | |
| 29 | ~SendCrash(); |
| 30 | |
| 31 | void search(); |
| 32 | |
| 33 | #ifdef ENABLE_UI |
| 34 | public: // INotificationDelegate impl |
| 35 | virtual std::string notificationText() override; |
| 36 | virtual void notificationClick() override; |
| 37 | |
| 38 | private: |
| 39 | void onClickFilename(); |
| 40 | void onClickDevFilename(); |
| 41 | #endif // ENABLE_UI |
| 42 | |
| 43 | private: |
| 44 | Task m_task; |
| 45 | std::string m_dumpFilename; |
| 46 | }; |
| 47 | |
| 48 | #endif // !ENABLE_SENTRY |
| 49 | |
| 50 | } // namespace app |
| 51 | |
| 52 | #endif // APP_SEND_CRASH_H_INCLUDED |
| 53 | |