OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/repost_form_warning_gtk.h" | 5 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/repost_form_warning_controller.h" | 8 #include "chrome/browser/repost_form_warning_controller.h" |
9 #include "chrome/browser/ui/gtk/gtk_util.h" | 9 #include "chrome/browser/ui/gtk/gtk_util.h" |
10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
11 #include "content/browser/tab_contents/navigation_controller.h" | 11 #include "content/browser/tab_contents/navigation_controller.h" |
12 #include "content/browser/tab_contents/tab_contents.h" | 12 #include "content/browser/tab_contents/tab_contents.h" |
13 #include "content/common/notification_type.h" | 13 #include "content/common/content_notification_types.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 | 16 |
17 RepostFormWarningGtk::RepostFormWarningGtk(GtkWindow* parent, | 17 RepostFormWarningGtk::RepostFormWarningGtk(GtkWindow* parent, |
18 TabContents* tab_contents) | 18 TabContents* tab_contents) |
19 : controller_(new RepostFormWarningController(tab_contents)) { | 19 : controller_(new RepostFormWarningController(tab_contents)) { |
20 dialog_ = gtk_vbox_new(FALSE, gtk_util::kContentAreaBorder); | 20 dialog_ = gtk_vbox_new(FALSE, gtk_util::kContentAreaBorder); |
21 gtk_box_set_spacing(GTK_BOX(dialog_), gtk_util::kContentAreaSpacing); | 21 gtk_box_set_spacing(GTK_BOX(dialog_), gtk_util::kContentAreaSpacing); |
22 GtkWidget* label = gtk_label_new( | 22 GtkWidget* label = gtk_label_new( |
23 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING).c_str()); | 23 l10n_util::GetStringUTF8(IDS_HTTP_POST_WARNING).c_str()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 gtk_widget_destroy(dialog_); | 73 gtk_widget_destroy(dialog_); |
74 } | 74 } |
75 | 75 |
76 void RepostFormWarningGtk::OnRefresh(GtkWidget* widget) { | 76 void RepostFormWarningGtk::OnRefresh(GtkWidget* widget) { |
77 controller_->Continue(); | 77 controller_->Continue(); |
78 } | 78 } |
79 | 79 |
80 void RepostFormWarningGtk::OnCancel(GtkWidget* widget) { | 80 void RepostFormWarningGtk::OnCancel(GtkWidget* widget) { |
81 controller_->Cancel(); | 81 controller_->Cancel(); |
82 } | 82 } |
OLD | NEW |