NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / views / first_run_dialog.h
blob9e374a65f500a800357343fca6c37ad6229892a9
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/message_loop/message_pump_dispatcher.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 base::MessagePumpDispatcher {
22 public:
23 // Displays the first run UI for reporting opt-in, import data etc.
24 // Returns true if the dialog was shown.
25 static bool Show(Profile* profile);
27 private:
28 explicit FirstRunDialog(Profile* profile);
29 virtual ~FirstRunDialog();
31 // views::DialogDelegate:
32 virtual views::View* CreateExtraView() OVERRIDE;
33 virtual void OnClosed() OVERRIDE;
34 virtual bool Accept() OVERRIDE;
35 virtual int GetDialogButtons() const OVERRIDE;
37 // views::LinkListener:
38 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
40 // Overridden from MessagePumpDispatcher:
41 virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE;
43 Profile* profile_;
44 views::Checkbox* make_default_;
45 views::Checkbox* report_crashes_;
47 // Set to false as soon as the user clicks a dialog button; this tells the
48 // dispatcher we're done.
49 bool should_show_dialog_;
52 #endif // CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_