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

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

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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) 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 gtk_box_pack_start(GTK_BOX(parent), extension_label, false, false, 124 gtk_box_pack_start(GTK_BOX(parent), extension_label, false, false,
125 kListItemPadding); 125 kListItemPadding);
126 } 126 }
127 } 127 }
128 128
129 void BundleInstalledBubbleGtk::BubbleClosing(BubbleGtk* bubble, 129 void BundleInstalledBubbleGtk::BubbleClosing(BubbleGtk* bubble,
130 bool closed_by_escape) { 130 bool closed_by_escape) {
131 // We need to allow the bubble to close and remove the widgets from 131 // We need to allow the bubble to close and remove the widgets from
132 // the window before we call Release() because close_button_ depends 132 // the window before we call Release() because close_button_ depends
133 // on all references being cleared before it is destroyed. 133 // on all references being cleared before it is destroyed.
134 MessageLoopForUI::current()->PostTask( 134 base::MessageLoopForUI::current()->PostTask(
135 FROM_HERE, 135 FROM_HERE, base::Bind(&BundleInstalledBubbleGtk::Close, this));
136 base::Bind(&BundleInstalledBubbleGtk::Close, this));
137 } 136 }
138 137
139 void BundleInstalledBubbleGtk::Close() { 138 void BundleInstalledBubbleGtk::Close() {
140 bubble_ = NULL; 139 bubble_ = NULL;
141 140
142 Release(); // Balanced in BundleInstalledBubbleGtk(). 141 Release(); // Balanced in BundleInstalledBubbleGtk().
143 } 142 }
144 143
145 void BundleInstalledBubbleGtk::OnButtonClick(GtkWidget* button, 144 void BundleInstalledBubbleGtk::OnButtonClick(GtkWidget* button,
146 BundleInstalledBubbleGtk* bubble) { 145 BundleInstalledBubbleGtk* bubble) {
147 if (button == bubble->close_button_->widget()) 146 if (button == bubble->close_button_->widget())
148 bubble->bubble_->Close(); 147 bubble->bubble_->Close();
149 else 148 else
150 NOTREACHED(); 149 NOTREACHED();
151 } 150 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/edit_search_engine_dialog.cc ('k') | chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698