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

Side by Side Diff: chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.cc

Issue 12742013: Inconsistent use of [x] close panel icon. Code changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_217094_3
Patch Set: Created 7 years, 9 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
OLDNEW
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/extensions/bundle_installed_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/bundle_installed_bubble_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 GtkWidget* text_column = gtk_vbox_new(FALSE, kTextColumnVerticalSpacing); 78 GtkWidget* text_column = gtk_vbox_new(FALSE, kTextColumnVerticalSpacing);
79 gtk_box_pack_start(GTK_BOX(bubble_content), text_column, FALSE, FALSE, 0); 79 gtk_box_pack_start(GTK_BOX(bubble_content), text_column, FALSE, FALSE, 0);
80 80
81 InsertExtensionList( 81 InsertExtensionList(
82 text_column, bundle, BundleInstaller::Item::STATE_INSTALLED); 82 text_column, bundle, BundleInstaller::Item::STATE_INSTALLED);
83 InsertExtensionList(text_column, bundle, BundleInstaller::Item::STATE_FAILED); 83 InsertExtensionList(text_column, bundle, BundleInstaller::Item::STATE_FAILED);
84 84
85 // Close button 85 // Close button
86 GtkWidget* close_column = gtk_vbox_new(FALSE, 0); 86 GtkWidget* close_column = gtk_vbox_new(FALSE, 0);
87 gtk_box_pack_start(GTK_BOX(bubble_content), close_column, FALSE, FALSE, 0); 87 gtk_box_pack_start(GTK_BOX(bubble_content), close_column, FALSE, FALSE, 0);
88 close_button_.reset(CustomDrawButton::CloseButton(theme_provider)); 88 close_button_.reset(CustomDrawButton::CloseButtonBubble(theme_provider));
89 g_signal_connect(close_button_->widget(), "clicked", 89 g_signal_connect(close_button_->widget(), "clicked",
90 G_CALLBACK(OnButtonClick), this); 90 G_CALLBACK(OnButtonClick), this);
91 gtk_box_pack_start(GTK_BOX(close_column), close_button_->widget(), 91 gtk_box_pack_start(GTK_BOX(close_column), close_button_->widget(),
92 FALSE, FALSE, 0); 92 FALSE, FALSE, 0);
93 93
94 gfx::Rect bounds = gtk_util::WidgetBounds(reference_widget); 94 gfx::Rect bounds = gtk_util::WidgetBounds(reference_widget);
95 95
96 bubble_ = BubbleGtk::Show(reference_widget, 96 bubble_ = BubbleGtk::Show(reference_widget,
97 &bounds, 97 &bounds,
98 bubble_content, 98 bubble_content,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 Release(); // Balanced in BundleInstalledBubbleGtk(). 142 Release(); // Balanced in BundleInstalledBubbleGtk().
143 } 143 }
144 144
145 void BundleInstalledBubbleGtk::OnButtonClick(GtkWidget* button, 145 void BundleInstalledBubbleGtk::OnButtonClick(GtkWidget* button,
146 BundleInstalledBubbleGtk* bubble) { 146 BundleInstalledBubbleGtk* bubble) {
147 if (button == bubble->close_button_->widget()) 147 if (button == bubble->close_button_->widget())
148 bubble->bubble_->Close(); 148 bubble->bubble_->Close();
149 else 149 else
150 NOTREACHED(); 150 NOTREACHED();
151 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698