OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/gtk/first_run_dialog.h" | 5 #include "chrome/browser/ui/gtk/first_run_dialog.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 if (show_reporting_dialog) { | 88 if (show_reporting_dialog) { |
89 // Object deletes itself. | 89 // Object deletes itself. |
90 new FirstRunDialog(); | 90 new FirstRunDialog(); |
91 dialog_shown = true; | 91 dialog_shown = true; |
92 | 92 |
93 // TODO(port): it should be sufficient to just run the dialog: | 93 // TODO(port): it should be sufficient to just run the dialog: |
94 // int response = gtk_dialog_run(GTK_DIALOG(dialog)); | 94 // int response = gtk_dialog_run(GTK_DIALOG(dialog)); |
95 // but that spins a nested message loop and hoses us. :( | 95 // but that spins a nested message loop and hoses us. :( |
96 // http://code.google.com/p/chromium/issues/detail?id=12552 | 96 // http://code.google.com/p/chromium/issues/detail?id=12552 |
97 // Instead, run a loop directly here. | 97 // Instead, run a loop directly here. |
98 MessageLoop::current()->Run(); | 98 base::MessageLoop::current()->Run(); |
99 } | 99 } |
100 #endif // defined(GOOGLE_CHROME_BUILD) | 100 #endif // defined(GOOGLE_CHROME_BUILD) |
101 return dialog_shown; | 101 return dialog_shown; |
102 } | 102 } |
103 | 103 |
104 FirstRunDialog::FirstRunDialog() | 104 FirstRunDialog::FirstRunDialog() |
105 : dialog_(NULL), | 105 : dialog_(NULL), |
106 report_crashes_(NULL), | 106 report_crashes_(NULL), |
107 make_default_(NULL) { | 107 make_default_(NULL) { |
108 ShowReportingDialog(); | 108 ShowReportingDialog(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton* button) { | 189 void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton* button) { |
190 platform_util::OpenExternal(GURL(chrome::kLearnMoreReportingURL)); | 190 platform_util::OpenExternal(GURL(chrome::kLearnMoreReportingURL)); |
191 } | 191 } |
192 | 192 |
193 void FirstRunDialog::FirstRunDone() { | 193 void FirstRunDialog::FirstRunDone() { |
194 first_run::SetShouldShowWelcomePage(); | 194 first_run::SetShouldShowWelcomePage(); |
195 | 195 |
196 if (dialog_) | 196 if (dialog_) |
197 gtk_widget_destroy(dialog_); | 197 gtk_widget_destroy(dialog_); |
198 MessageLoop::current()->Quit(); | 198 base::MessageLoop::current()->Quit(); |
199 delete this; | 199 delete this; |
200 } | 200 } |
OLD | NEW |