OLD | NEW |
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 Loading... |
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 } |
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 } |
OLD | NEW |