David Bienvenu | fa7a2cd | 2025-03-26 22:56:51 | [diff] [blame] | 1 | // Copyright 2025 The Chromium Authors |
| 2 | // 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_WIN_TASKBAR_MANAGER_H_ |
| 6 | #define CHROME_BROWSER_WIN_TASKBAR_MANAGER_H_ |
| 7 | |
David Bienvenu | ec47f98 | 2025-03-28 21:32:29 | [diff] [blame] | 8 | #include <string> |
| 9 | |
David Bienvenu | fa7a2cd | 2025-03-26 22:56:51 | [diff] [blame] | 10 | #include "base/functional/callback_forward.h" |
David Bienvenu | fa7a2cd | 2025-03-26 22:56:51 | [diff] [blame] | 11 | |
| 12 | namespace browser_util { |
| 13 | |
| 14 | using PinResultCallback = base::OnceCallback<void(bool)>; |
| 15 | |
| 16 | // Functions to pin an icon for a Chrome window to the Windows taskbar, and to |
| 17 | // check if Chrome should offer to pin. These functions do most of their work on |
| 18 | // a background thread, but have to finish the work on the UI thread. |
David Bienvenu | f6e6c04e | 2025-04-01 22:11:45 | [diff] [blame] | 19 | // The result callback will be called from the thread that called them. |
David Bienvenu | fa7a2cd | 2025-03-26 22:56:51 | [diff] [blame] | 20 | |
| 21 | // `callback` is called with true if pinning is supported, and the app is not |
| 22 | // currently pinned to the taskbar, false otherwise. There must be a shortcut |
| 23 | // with `app_user_model_id` in the start menu for pinning to be supported. |
David Bienvenu |
|