Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: chrome/browser/ui/gtk/infobars/confirm_infobar_gtk.cc

Issue 10546116: gtk: Extract event functions into event_utils module. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util_unittest.cc ('k') | chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698