| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 namespace { | 48 namespace { |
| 49 | 49 |
| 50 // Margin, in pixels, between the notification frame and the contents | 50 // Margin, in pixels, between the notification frame and the contents |
| 51 // of the notification. | 51 // of the notification. |
| 52 const int kTopMargin = 0; | 52 const int kTopMargin = 0; |
| 53 const int kBottomMargin = 1; | 53 const int kBottomMargin = 1; |
| 54 const int kLeftMargin = 1; | 54 const int kLeftMargin = 1; |
| 55 const int kRightMargin = 1; | 55 const int kRightMargin = 1; |
| 56 | 56 |
| 57 // How many pixels of overlap there is between the shelf top and the | |
| 58 // balloon bottom. | |
| 59 const int kShelfBorderTopOverlap = 0; | |
| 60 | |
| 61 // Properties of the origin label. | 57 // Properties of the origin label. |
| 62 const int kLeftLabelMargin = 8; | 58 const int kLeftLabelMargin = 8; |
| 63 | 59 |
| 64 // TODO(johnnyg): Add a shadow for the frame. | 60 // TODO(johnnyg): Add a shadow for the frame. |
| 65 const int kLeftShadowWidth = 0; | 61 const int kLeftShadowWidth = 0; |
| 66 const int kRightShadowWidth = 0; | 62 const int kRightShadowWidth = 0; |
| 67 const int kTopShadowWidth = 0; | 63 const int kTopShadowWidth = 0; |
| 68 const int kBottomShadowWidth = 0; | 64 const int kBottomShadowWidth = 0; |
| 69 | 65 |
| 70 // Space in pixels between text and icon on the buttons. | 66 // Space in pixels between text and icon on the buttons. |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 base::Bind( | 465 base::Bind( |
| 470 &BalloonViewImpl::DelayedClose, weak_factory_.GetWeakPtr(), false)); | 466 &BalloonViewImpl::DelayedClose, weak_factory_.GetWeakPtr(), false)); |
| 471 } | 467 } |
| 472 } | 468 } |
| 473 | 469 |
| 474 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { | 470 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { |
| 475 frame_container_ = NULL; | 471 frame_container_ = NULL; |
| 476 Close(false); | 472 Close(false); |
| 477 return FALSE; // Propagate. | 473 return FALSE; // Propagate. |
| 478 } | 474 } |
| OLD | NEW |