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/update_recommended_dialog.h" | 5 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
11 #include "chrome/browser/ui/gtk/gtk_util.h" | 11 #include "chrome/browser/ui/gtk/gtk_util.h" |
12 #include "grit/chromium_strings.h" | 12 #include "grit/chromium_strings.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 | 15 |
16 static const int kMessageWidth = 400; | 16 static const int kMessageWidth = 400; |
17 | 17 |
18 // static | 18 // static |
19 void UpdateRecommendedDialog::Show(GtkWindow* parent) { | 19 void UpdateRecommendedDialog::Show(GtkWindow* parent) { |
20 new UpdateRecommendedDialog(parent); | 20 new UpdateRecommendedDialog(parent); |
(...skipping 26 matching lines...) Expand all Loading... |
47 | 47 |
48 gtk_widget_show_all(dialog_); | 48 gtk_widget_show_all(dialog_); |
49 } | 49 } |
50 | 50 |
51 UpdateRecommendedDialog::~UpdateRecommendedDialog() { | 51 UpdateRecommendedDialog::~UpdateRecommendedDialog() { |
52 } | 52 } |
53 | 53 |
54 void UpdateRecommendedDialog::OnResponse(GtkWidget* dialog, int response_id) { | 54 void UpdateRecommendedDialog::OnResponse(GtkWidget* dialog, int response_id) { |
55 gtk_widget_destroy(dialog_); | 55 gtk_widget_destroy(dialog_); |
56 | 56 |
57 if (response_id == GTK_RESPONSE_ACCEPT) { | 57 if (response_id == GTK_RESPONSE_ACCEPT) |
58 BrowserList::AttemptRestart(); | 58 browser::AttemptRestart(); |
59 } | |
60 | 59 |
61 delete this; | 60 delete this; |
62 } | 61 } |
OLD | NEW |