Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: chrome/browser/ui/views/first_run_dialog.h

Issue 137393008: linux_aura: Port the linux first run dialog to aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_
7
8 #include "base/message_loop/message_loop.h"
9 #include "ui/views/controls/link_listener.h"
10 #include "ui/views/window/dialog_delegate.h"
11
12 class Profile;
13
14 namespace views {
15 class Checkbox;
16 class Link;
17 }
18
19 class FirstRunDialog : public views::DialogDelegateView,
20 public views::LinkListener,
21 public base::MessageLoop::Dispatcher {
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);
26
27 private:
28 explicit FirstRunDialog(Profile* profile);
29 virtual ~FirstRunDialog();
30
31 void Init();
32
33 // views::DialogDelegate:
34 virtual views::View* CreateExtraView() OVERRIDE;
35 virtual void OnClosed() OVERRIDE;
36 virtual bool Accept() OVERRIDE;
37 virtual int GetDialogButtons() const OVERRIDE;
38
39 // views::LinkListener:
40 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
41
42 // Overridden from MessageLoop::Dispatcher:
43 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
44
45 Profile* profile_;
46 views::Checkbox* make_default_;
47 views::Checkbox* report_crashes_;
48
49 // Set to false as soon as the user clicks a dialog button; this tells the
50 // dispatcher we're done.
51 bool should_show_dialog_;
52 };
53
54 #endif // CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698