[email protected] | 9a47c43 | 2013-04-19 20:33:55 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 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_CHROME_PROCESS_SINGLETON_H_ |
| 6 | #define CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_ |
| 7 | |
Greg Thompson | eafda51e | 2017-09-05 23:09:45 | [diff] [blame] | 8 | #include "base/callback.h" |
[email protected] | 9a47c43 | 2013-04-19 20:33:55 | [diff] [blame] | 9 | #include "base/files/file_path.h" |
[email protected] | 9a47c43 | 2013-04-19 20:33:55 | [diff] [blame] | 10 | #include "chrome/browser/process_singleton.h" |
| 11 | #include "chrome/browser/process_singleton_modal_dialog_lock.h" |
| 12 | #include "chrome/browser/process_singleton_startup_lock.h" |
[email protected] | 9a47c43 | 2013-04-19 20:33:55 | [diff] [blame] | 13 | |
| 14 | // Composes a basic ProcessSingleton with ProcessSingletonStartupLock and |
| 15 | // ProcessSingletonModalDialogLock. |
| 16 | // |
Greg Thompson | eafda51e | 2017-09-05 23:09:45 | [diff] [blame] | 17 | // Notifications from ProcessSingleton will first close a modal dialog if |
| 18 | // active. Otherwise, until |Unlock()| is called, they will be queued up. Once |
| 19 | // unlocked, notifications will be passed to the client-supplied |
[email protected] | 9a47c43 | 2013-04-19 20:33:55 | [diff] [blame] | 20 | // NotificationCallback. |
| 21 | // |
Greg Thompson | eafda51e | 2017-09-05 23:09:45 | [diff] [blame] | 22 | // The client must ensure that SetModalDialogNotificationHandler is called |
| 23 | // appropriately when dialogs are displayed or dismissed during startup. If a |
| 24 | // dialog is active, it is closed (via the provided handler) and then the |
| 25 | // notification is processed as normal. |
[email protected] | 9a47c43 | 2013-04-19 20:33:55 | [diff] [blame] | 26 | class ChromeProcessSingleton { |
|
|