Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / views / first_run_dialog.h
blob31f68bb9a6c519e2229e79ab042dc26bd354b675
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_
8 #include "base/callback.h"
9 #include "ui/views/controls/link_listener.h"
10 #include "ui/views/window/dialog_delegate.h"
12 class Profile;
14 namespace views {
15 class Checkbox;
16 class Link;
19 class FirstRunDialog : public views::DialogDelegateView,
20 public views::LinkListener {
21 public:
22 // Displays the first run UI for reporting opt-in, import data etc.
23 // Returns true if the dialog was shown.
24 static bool Show(Profile* profile);
26 private:
27 explicit FirstRunDialog(Profile* profile);
28 ~FirstRunDialog() override;
30 // This terminates the nested message-loop.
31 void Done();
33 // views::DialogDelegate:
34 views::View* CreateExtraView() override;
35 void OnClosed() override;
36 bool Accept() override;
37 int GetDialogButtons() const override;
39 // views::LinkListener:
40 void LinkClicked(views::Link* source, int event_flags) override;
42 Profile* profile_;
43 views::Checkbox* make_default_;
44 views::Checkbox* report_crashes_;
45 base::Closure quit_runloop_;
47 DISALLOW_COPY_AND_ASSIGN(FirstRunDialog);
50 #endif // CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_