OLD | NEW |
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/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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } // namespace | 97 } // namespace |
98 | 98 |
99 BalloonViewImpl::BalloonViewImpl(BalloonCollection* collection) | 99 BalloonViewImpl::BalloonViewImpl(BalloonCollection* collection) |
100 : balloon_(NULL), | 100 : balloon_(NULL), |
101 theme_service_(NULL), | 101 theme_service_(NULL), |
102 frame_container_(NULL), | 102 frame_container_(NULL), |
103 shelf_(NULL), | 103 shelf_(NULL), |
104 hbox_(NULL), | 104 hbox_(NULL), |
105 html_container_(NULL), | 105 html_container_(NULL), |
106 weak_factory_(this), | 106 weak_factory_(this), |
107 close_button_(NULL), | |
108 animation_(NULL), | |
109 menu_showing_(false), | 107 menu_showing_(false), |
110 pending_close_(false) { | 108 pending_close_(false) {} |
111 } | |
112 | 109 |
113 BalloonViewImpl::~BalloonViewImpl() { | 110 BalloonViewImpl::~BalloonViewImpl() { |
114 if (frame_container_) { | 111 if (frame_container_) { |
115 GtkWidget* widget = frame_container_; | 112 GtkWidget* widget = frame_container_; |
116 frame_container_ = NULL; | 113 frame_container_ = NULL; |
117 gtk_widget_hide(widget); | 114 gtk_widget_hide(widget); |
118 } | 115 } |
119 } | 116 } |
120 | 117 |
121 void BalloonViewImpl::Close(bool by_user) { | 118 void BalloonViewImpl::Close(bool by_user) { |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 base::Bind( | 469 base::Bind( |
473 &BalloonViewImpl::DelayedClose, weak_factory_.GetWeakPtr(), false)); | 470 &BalloonViewImpl::DelayedClose, weak_factory_.GetWeakPtr(), false)); |
474 } | 471 } |
475 } | 472 } |
476 | 473 |
477 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { | 474 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { |
478 frame_container_ = NULL; | 475 frame_container_ = NULL; |
479 Close(false); | 476 Close(false); |
480 return FALSE; // Propagate. | 477 return FALSE; // Propagate. |
481 } | 478 } |
OLD | NEW |