blob: 51a554d5d6646d35fa5ee3c960dafa6f366d2464 [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2012 The Chromium Authors
[email protected]bab43262012-05-30 19:21:182// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_PRINTING_PRINT_ERROR_DIALOG_H_
6#define CHROME_BROWSER_PRINTING_PRINT_ERROR_DIALOG_H_
[email protected]bab43262012-05-30 19:21:187
Alan Screend2260302022-10-27 23:03:478#include "base/functional/callback_forward.h"
9
Lei Zhang52073472023-02-10 23:45:4510// Functions related to showing error dialogs for printing errors. Error dialogs
11// additionally create PRINTER_LOG() entries.
12
Lei Zhang51e06fac2023-02-10 19:21:0713// Shows a window-modal error when a selected printer is invalid.
14void ShowPrintErrorDialogForInvalidPrinterError();
[email protected]bab43262012-05-30 19:21:1815
Lei Zhang51e06fac2023-02-10 19:21:0716// Shows a window-modal error when printing failed for some unknown reason.
17void ShowPrintErrorDialogForGenericError();
18
19// Allows tests to override the error dialogs. Instead of displaying a
20// window-modal dialog that can block test completion, runs `callback` instead.
21// Must be called from the UI thread.
Alan Screend2260302022-10-27 23:03:4722void SetShowPrintErrorDialogForTest(base::RepeatingClosure callback);
23
[email protected]bab43262012-05-30 19:21:1824#endif // CHROME_BROWSER_PRINTING_PRINT_ERROR_DIALOG_H_