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

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

Issue 6580024: Merge 75767 - It's not safe to delete the balloon view during MenuDelegate::S... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/648/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 | « chrome/browser/ui/gtk/notifications/balloon_view_gtk.h ('k') | 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 return FALSE; 424 return FALSE;
425 } 425 }
426 426
427 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { 427 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) {
428 menu_showing_ = true; 428 menu_showing_ = true;
429 options_menu_->PopupAsContext(gtk_get_current_event_time()); 429 options_menu_->PopupAsContext(gtk_get_current_event_time());
430 } 430 }
431 431
432 // Called when the menu stops showing. 432 // Called when the menu stops showing.
433 void BalloonViewImpl::StoppedShowing() { 433 void BalloonViewImpl::StoppedShowing() {
434 if (pending_close_)
435 DelayedClose(false);
436 menu_showing_ = false; 434 menu_showing_ = false;
435 if (pending_close_) {
436 MessageLoop::current()->PostTask(
437 FROM_HERE,
438 method_factory_.NewRunnableMethod(
439 &BalloonViewImpl::DelayedClose, false));
440 }
437 } 441 }
438 442
439 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { 443 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) {
440 frame_container_ = NULL; 444 frame_container_ = NULL;
441 Close(false); 445 Close(false);
442 return FALSE; // Propagate. 446 return FALSE; // Propagate.
443 } 447 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/notifications/balloon_view_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698