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

Side by Side Diff: chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc

Issue 6541082: It's not safe to delete the balloon view during MenuDelegate::StoppedShowing,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/notifications/balloon_view_gtk.h" 5 #include "chrome/browser/ui/gtk/notifications/balloon_view_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 } 452 }
453 453
454 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget, 454 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget,
455 GdkEventButton* event) { 455 GdkEventButton* event) {
456 menu_showing_ = true; 456 menu_showing_ = true;
457 options_menu_->PopupForWidget(widget, event->button, event->time); 457 options_menu_->PopupForWidget(widget, event->button, event->time);
458 } 458 }
459 459
460 // Called when the menu stops showing. 460 // Called when the menu stops showing.
461 void BalloonViewImpl::StoppedShowing() { 461 void BalloonViewImpl::StoppedShowing() {
462 if (pending_close_)
463 DelayedClose(false);
464 menu_showing_ = false; 462 menu_showing_ = false;
463 if (pending_close_) {
464 MessageLoop::current()->PostTask(
465 FROM_HERE,
466 method_factory_.NewRunnableMethod(
467 &BalloonViewImpl::DelayedClose, false));
468 }
Andrew T Wilson (Slow) 2011/02/23 00:43:58 So, is the intent that DelayedClose() should never
465 } 469 }
466 470
467 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { 471 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) {
468 frame_container_ = NULL; 472 frame_container_ = NULL;
469 Close(false); 473 Close(false);
470 return FALSE; // Propagate. 474 return FALSE; // Propagate.
471 } 475 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698