Index: chrome/browser/ui/views/first_run_dialog.h |
diff --git a/chrome/browser/ui/views/first_run_dialog.h b/chrome/browser/ui/views/first_run_dialog.h |
index 2eb9d5d1a89cc8571b45ff98c40c7b087119e318..9e374a65f500a800357343fca6c37ad6229892a9 100644 |
--- a/chrome/browser/ui/views/first_run_dialog.h |
+++ b/chrome/browser/ui/views/first_run_dialog.h |
@@ -5,6 +5,7 @@ |
#ifndef CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_ |
#define CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_ |
+#include "base/message_loop/message_pump_dispatcher.h" |
#include "ui/views/controls/link_listener.h" |
#include "ui/views/window/dialog_delegate.h" |
@@ -16,7 +17,8 @@ |
} |
class FirstRunDialog : public views::DialogDelegateView, |
- public views::LinkListener { |
+ public views::LinkListener, |
+ public base::MessagePumpDispatcher { |
public: |
// Displays the first run UI for reporting opt-in, import data etc. |
// Returns true if the dialog was shown. |
@@ -25,9 +27,6 @@ |
private: |
explicit FirstRunDialog(Profile* profile); |
virtual ~FirstRunDialog(); |
- |
- // This terminates the nested message-loop. |
- void Done(); |
// views::DialogDelegate: |
virtual views::View* CreateExtraView() OVERRIDE; |
@@ -38,11 +37,16 @@ |
// views::LinkListener: |
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
+ // Overridden from MessagePumpDispatcher: |
+ virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; |
+ |
Profile* profile_; |
views::Checkbox* make_default_; |
views::Checkbox* report_crashes_; |
- DISALLOW_COPY_AND_ASSIGN(FirstRunDialog); |
+ // Set to false as soon as the user clicks a dialog button; this tells the |
+ // dispatcher we're done. |
+ bool should_show_dialog_; |
}; |
#endif // CHROME_BROWSER_UI_VIEWS_FIRST_RUN_DIALOG_H_ |