OLD | NEW |
1 // Copyright (c) 2011 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/infobars/confirm_infobar_gtk.h" | 5 #include "chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/ui/gtk/event_utils.h" |
10 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 11 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
11 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" | 12 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" |
12 #include "chrome/browser/ui/gtk/gtk_util.h" | 13 #include "chrome/browser/ui/gtk/gtk_util.h" |
13 #include "ui/base/gtk/gtk_signal_registrar.h" | 14 #include "ui/base/gtk/gtk_signal_registrar.h" |
14 | 15 |
15 // ConfirmInfoBarDelegate ------------------------------------------------------ | 16 // ConfirmInfoBarDelegate ------------------------------------------------------ |
16 | 17 |
17 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { | 18 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { |
18 return new ConfirmInfoBarGtk(owner, this); | 19 return new ConfirmInfoBarGtk(owner, this); |
19 } | 20 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 RemoveSelf(); | 88 RemoveSelf(); |
88 } | 89 } |
89 | 90 |
90 void ConfirmInfoBarGtk::OnCancelButton(GtkWidget* widget) { | 91 void ConfirmInfoBarGtk::OnCancelButton(GtkWidget* widget) { |
91 if (delegate()->AsConfirmInfoBarDelegate()->Cancel()) | 92 if (delegate()->AsConfirmInfoBarDelegate()->Cancel()) |
92 RemoveSelf(); | 93 RemoveSelf(); |
93 } | 94 } |
94 | 95 |
95 void ConfirmInfoBarGtk::OnLinkClicked(GtkWidget* widget) { | 96 void ConfirmInfoBarGtk::OnLinkClicked(GtkWidget* widget) { |
96 if (delegate()->AsConfirmInfoBarDelegate()->LinkClicked( | 97 if (delegate()->AsConfirmInfoBarDelegate()->LinkClicked( |
97 gtk_util::DispositionForCurrentButtonPressEvent())) | 98 event_utils::DispositionForCurrentButtonPressEvent())) |
98 RemoveSelf(); | 99 RemoveSelf(); |
99 } | 100 } |
OLD | NEW |