| 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 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/ui/gtk/gtk_util.h" | 28 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 29 #include "chrome/browser/ui/gtk/info_bubble_gtk.h" | 29 #include "chrome/browser/ui/gtk/info_bubble_gtk.h" |
| 30 #include "chrome/browser/ui/gtk/menu_gtk.h" | 30 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 31 #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h" | 31 #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h" |
| 32 #include "chrome/browser/ui/gtk/rounded_window.h" | 32 #include "chrome/browser/ui/gtk/rounded_window.h" |
| 33 #include "chrome/common/extensions/extension.h" | 33 #include "chrome/common/extensions/extension.h" |
| 34 #include "chrome/common/notification_details.h" | 34 #include "chrome/common/notification_details.h" |
| 35 #include "chrome/common/notification_service.h" | 35 #include "chrome/common/notification_service.h" |
| 36 #include "chrome/common/notification_source.h" | 36 #include "chrome/common/notification_source.h" |
| 37 #include "chrome/common/notification_type.h" | 37 #include "chrome/common/notification_type.h" |
| 38 #include "gfx/canvas.h" | |
| 39 #include "gfx/insets.h" | |
| 40 #include "gfx/native_widget_types.h" | |
| 41 #include "grit/generated_resources.h" | 38 #include "grit/generated_resources.h" |
| 42 #include "grit/theme_resources.h" | 39 #include "grit/theme_resources.h" |
| 43 #include "ui/base/animation/slide_animation.h" | 40 #include "ui/base/animation/slide_animation.h" |
| 44 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
| 45 #include "ui/base/resource/resource_bundle.h" | 42 #include "ui/base/resource/resource_bundle.h" |
| 43 #include "ui/gfx/canvas.h" |
| 44 #include "ui/gfx/insets.h" |
| 45 #include "ui/gfx/native_widget_types.h" |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 // Margin, in pixels, between the notification frame and the contents | 49 // Margin, in pixels, between the notification frame and the contents |
| 50 // of the notification. | 50 // of the notification. |
| 51 const int kTopMargin = 0; | 51 const int kTopMargin = 0; |
| 52 const int kBottomMargin = 1; | 52 const int kBottomMargin = 1; |
| 53 const int kLeftMargin = 1; | 53 const int kLeftMargin = 1; |
| 54 const int kRightMargin = 1; | 54 const int kRightMargin = 1; |
| 55 | 55 |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 if (pending_close_) | 461 if (pending_close_) |
| 462 DelayedClose(false); | 462 DelayedClose(false); |
| 463 menu_showing_ = false; | 463 menu_showing_ = false; |
| 464 } | 464 } |
| 465 | 465 |
| 466 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { | 466 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { |
| 467 frame_container_ = NULL; | 467 frame_container_ = NULL; |
| 468 Close(false); | 468 Close(false); |
| 469 return FALSE; // Propagate. | 469 return FALSE; // Propagate. |
| 470 } | 470 } |
| OLD | NEW |