diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch index d6aba47..56dc7e2 100644 --- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch +++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | --- a/chrome/browser/ui/browser.cc | 1 | --- chrome/browser/ui/browser.cc.orig |
| 2 | +++ b/chrome/browser/ui/browser.cc | 2 | +++ chrome/browser/ui/browser.cc |
| 3 | @@ -138,6 +138,8 @@ | 3 | @@ -140,6 +140,8 @@ |
| 4 | #include "chrome/browser/ui/tabs/tab_strip_model.h" | 4 | #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 5 | #include "chrome/browser/ui/tabs/tab_utils.h" | 5 | #include "chrome/browser/ui/tabs/tab_utils.h" |
| 6 | #include "chrome/browser/ui/ui_features.h" | 6 | #include "chrome/browser/ui/ui_features.h" |
| @@ -9,7 +9,7 @@ | |||
| 9 | #include "chrome/browser/ui/web_applications/app_browser_controller.h" | 9 | #include "chrome/browser/ui/web_applications/app_browser_controller.h" |
| 10 | #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" | 10 | #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" |
| 11 | #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 11 | #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| 12 | @@ -469,6 +471,7 @@ Browser::Browser(const CreateParams& par | 12 | @@ -467,6 +469,7 @@ Browser::Browser(const CreateParams& par |
| 13 | omit_from_session_restore_(params.omit_from_session_restore), | 13 | omit_from_session_restore_(params.omit_from_session_restore), |
| 14 | should_trigger_session_restore_(params.should_trigger_session_restore), | 14 | should_trigger_session_restore_(params.should_trigger_session_restore), |
| 15 | cancel_download_confirmation_state_(NOT_PROMPTED), | 15 | cancel_download_confirmation_state_(NOT_PROMPTED), |
| @@ -17,7 +17,7 @@ | |||
| 17 | override_bounds_(params.initial_bounds), | 17 | override_bounds_(params.initial_bounds), |
| 18 | initial_show_state_(params.initial_show_state), | 18 | initial_show_state_(params.initial_show_state), |
| 19 | initial_workspace_(params.initial_workspace), | 19 | initial_workspace_(params.initial_workspace), |
| 20 | @@ -836,7 +839,7 @@ Browser::WarnBeforeClosingResult Browser | 20 | @@ -830,7 +833,7 @@ Browser::WarnBeforeClosingResult Browser |
| 21 | // If the browser can close right away (there are no pending downloads we need | 21 | // If the browser can close right away (there are no pending downloads we need |
| 22 | // to prompt about) then there's no need to warn. In the future, we might need | 22 | // to prompt about) then there's no need to warn. In the future, we might need |
| 23 | // to check other conditions as well. | 23 | // to check other conditions as well. |
| @@ -26,7 +26,7 @@ | |||
| 26 | return WarnBeforeClosingResult::kOkToClose; | 26 | return WarnBeforeClosingResult::kOkToClose; |
| 27 | 27 | ||
| 28 | DCHECK(!warn_before_closing_callback_) | 28 | DCHECK(!warn_before_closing_callback_) |
| 29 | @@ -866,6 +869,7 @@ bool Browser::TryToCloseWindow( | 29 | @@ -860,6 +863,7 @@ bool Browser::TryToCloseWindow( |
| 30 | 30 | ||
| 31 | void Browser::ResetTryToCloseWindow() { | 31 | void Browser::ResetTryToCloseWindow() { |
| 32 | cancel_download_confirmation_state_ = NOT_PROMPTED; | 32 | cancel_download_confirmation_state_ = NOT_PROMPTED; |
| @@ -34,7 +34,7 @@ | |||
| 34 | unload_controller_.ResetTryToCloseWindow(); | 34 | unload_controller_.ResetTryToCloseWindow(); |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | @@ -2725,6 +2729,62 @@ bool Browser::CanCloseWithInProgressDown | 37 | @@ -2702,6 +2706,62 @@ bool Browser::CanCloseWithInProgressDown |
| 38 | return false; | 38 | return false; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| @@ -97,7 +97,7 @@ | |||
| 97 | void Browser::InProgressDownloadResponse(bool cancel_downloads) { | 97 | void Browser::InProgressDownloadResponse(bool cancel_downloads) { |
| 98 | if (cancel_downloads) { | 98 | if (cancel_downloads) { |
| 99 | cancel_download_confirmation_state_ = RESPONSE_RECEIVED; | 99 | cancel_download_confirmation_state_ = RESPONSE_RECEIVED; |
| 100 | @@ -2743,6 +2803,22 @@ void Browser::InProgressDownloadResponse | 100 | @@ -2720,6 +2780,22 @@ void Browser::InProgressDownloadResponse |
| 101 | 101 | ||
| 102 | std::move(warn_before_closing_callback_) | 102 | std::move(warn_before_closing_callback_) |
| 103 | .Run(WarnBeforeClosingResult::kDoNotClose); | 103 | .Run(WarnBeforeClosingResult::kDoNotClose); |
| @@ -120,8 +120,8 @@ | |||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void Browser::FinishWarnBeforeClosing(WarnBeforeClosingResult result) { | 122 | void Browser::FinishWarnBeforeClosing(WarnBeforeClosingResult result) { |
| 123 | --- a/chrome/browser/ui/browser.h | 123 | --- chrome/browser/ui/browser.h.orig |
| 124 | +++ b/chrome/browser/ui/browser.h | 124 | +++ chrome/browser/ui/browser.h |
| 125 | @@ -26,6 +26,7 @@ | 125 | @@ -26,6 +26,7 @@ |
| 126 | #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_observer.h" | 126 | #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_observer.h" |
| 127 | #include "chrome/browser/ui/browser_navigator_params.h" | 127 | #include "chrome/browser/ui/browser_navigator_params.h" |
| @@ -130,7 +130,7 @@ | |||
| 130 | #include "chrome/browser/ui/signin_view_controller.h" | 130 | #include "chrome/browser/ui/signin_view_controller.h" |
| 131 | #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 131 | #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 132 | #include "chrome/browser/ui/unload_controller.h" | 132 | #include "chrome/browser/ui/unload_controller.h" |
| 133 | @@ -1010,12 +1011,17 @@ class Browser : public TabStripModelObse | 133 | @@ -1008,12 +1009,17 @@ class Browser : public TabStripModelObse |
| 134 | // Returns true if the window can close, false otherwise. | 134 | // Returns true if the window can close, false otherwise. |
| 135 | bool CanCloseWithInProgressDownloads(); | 135 | bool CanCloseWithInProgressDownloads(); |
| 136 | 136 | ||
| @@ -148,7 +148,7 @@ | |||
| 148 | // Called when all warnings have completed when attempting to close the | 148 | // Called when all warnings have completed when attempting to close the |
| 149 | // browser directly (e.g. via hotkey, close button, terminate signal, etc.) | 149 | // browser directly (e.g. via hotkey, close button, terminate signal, etc.) |
| 150 | // Used as a WarnBeforeClosingCallback by ShouldCloseWindow(). | 150 | // Used as a WarnBeforeClosingCallback by ShouldCloseWindow(). |
| 151 | @@ -1178,6 +1184,8 @@ class Browser : public TabStripModelObse | 151 | @@ -1176,6 +1182,8 @@ class Browser : public TabStripModelObse |
| 152 | // when the browser is closed with in-progress downloads. | 152 | // when the browser is closed with in-progress downloads. |
| 153 | CancelDownloadConfirmationState cancel_download_confirmation_state_; | 153 | CancelDownloadConfirmationState cancel_download_confirmation_state_; |
| 154 | 154 | ||
| @@ -157,9 +157,9 @@ | |||
| 157 | ///////////////////////////////////////////////////////////////////////////// | 157 | ///////////////////////////////////////////////////////////////////////////// |
| 158 | 158 | ||
| 159 | // Override values for the bounds of the window and its maximized or minimized | 159 | // Override values for the bounds of the window and its maximized or minimized |
| 160 | --- a/chrome/browser/ungoogled_flag_choices.h | 160 | --- chrome/browser/ungoogled_flag_choices.h.orig |
| 161 | +++ b/chrome/browser/ungoogled_flag_choices.h | 161 | +++ chrome/browser/ungoogled_flag_choices.h |
| 162 | @@ -61,4 +61,13 @@ const FeatureEntry::Choice kCloseWindowW | 162 | @@ -66,4 +66,13 @@ const FeatureEntry::Choice kCloseWindowW |
| 163 | "close-window-with-last-tab", | 163 | "close-window-with-last-tab", |
| 164 | "never"}, | 164 | "never"}, |
| 165 | }; | 165 | }; |
| @@ -173,9 +173,9 @@ | |||
| 173 | + "multiple"}, | 173 | + "multiple"}, |
| 174 | +}; | 174 | +}; |
| 175 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ | 175 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ |
| 176 | --- a/chrome/browser/ungoogled_flag_entries.h | 176 | --- chrome/browser/ungoogled_flag_entries.h.orig |
| 177 | +++ b/chrome/browser/ungoogled_flag_entries.h | 177 | +++ chrome/browser/ungoogled_flag_entries.h |
| 178 | @@ -72,4 +72,8 @@ | 178 | @@ -80,4 +80,8 @@ |
| 179 | "Remove Grab Handle", | 179 | "Remove Grab Handle", |
| 180 | "Removes the reserved empty space in the tabstrip for moving the window. ungoogled-chromium flag", | 180 | "Removes the reserved empty space in the tabstrip for moving the window. ungoogled-chromium flag", |
| 181 | kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")}, | 181 | kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")}, |
