blob: 26f53cbc043a9f94f3fd96e97abb8eccfabb467f [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2012 The Chromium Authors
[email protected]9de26c9b2011-04-18 22:32: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_FIRST_RUN_FIRST_RUN_DIALOG_H_
6#define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_DIALOG_H_
[email protected]9de26c9b2011-04-18 22:32:187
Avi Drissman02e49e582023-01-07 01:23:188#include "base/functional/callback_forward.h"
Trent Apted4d7d11d42017-11-17 07:42:519#include "build/build_config.h"
10
11// Hide this function on platforms where the dialog does not exist.
Georg Neisae2d4c22025-02-14 16:54:0512#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
Trent Apted4d7d11d42017-11-17 07:42:5113
[email protected]9de26c9b2011-04-18 22:32:1814namespace first_run {
15
Trent Apted4d7d11d42017-11-17 07:42:5116// Shows the first run dialog. Only called for organic first runs on Mac and
17// desktop Linux official builds when metrics reporting is not already enabled.
18// Invokes ChangeMetricsReportingState() if consent is given to enable crash
19// reporting, and may initiate the flow to set the default browser.
David Rogerd283a172022-10-06 10:01:1520void ShowFirstRunDialog();
21void ShowFirstRunDialogViews();
Keren Zhu5680b21d2021-05-14 19:01:0722// Maintain Cocoa-based first run dialog until we are confident that views'
23// implementation works well on macOS.
Xiaohan Wang19e3055c2022-01-16 04:19:3224#if BUILDFLAG(IS_MAC)
David Rogerd283a172022-10-06 10:01:1525void ShowFirstRunDialogCocoa();
Keren Zhu5680b21d2021-05-14 19:01:0726#endif
Trent Apted4d7d11d42017-11-17 07:42:5127
28// Returns a Closure invoked before calling ShowFirstRunDialog(). For testing.
29base::OnceClosure& GetBeforeShowFirstRunDialogHookForTesting();
[email protected]9de26c9b2011-04-18 22:32:1830
31} // namespace first_run
32
Georg Neisae2d4c22025-02-14 16:54:0533#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
Trent Apted4d7d11d42017-11-17 07:42:5134
[email protected]9de26c9b2011-04-18 22:32:1835#endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_DIALOG_H_