| 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> |
| 11 | 11 |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "app/resource_bundle.h" | |
| 14 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 15 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 16 #include "chrome/browser/browser_list.h" | 15 #include "chrome/browser/browser_list.h" |
| 17 #include "chrome/browser/browser_window.h" | 16 #include "chrome/browser/browser_window.h" |
| 18 #include "chrome/browser/extensions/extension_host.h" | 17 #include "chrome/browser/extensions/extension_host.h" |
| 19 #include "chrome/browser/extensions/extension_process_manager.h" | 18 #include "chrome/browser/extensions/extension_process_manager.h" |
| 20 #include "chrome/browser/notifications/balloon.h" | 19 #include "chrome/browser/notifications/balloon.h" |
| 21 #include "chrome/browser/notifications/desktop_notification_service.h" | 20 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 22 #include "chrome/browser/notifications/notification.h" | 21 #include "chrome/browser/notifications/notification.h" |
| 23 #include "chrome/browser/notifications/notification_options_menu_model.h" | 22 #include "chrome/browser/notifications/notification_options_menu_model.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 36 #include "chrome/common/notification_details.h" | 35 #include "chrome/common/notification_details.h" |
| 37 #include "chrome/common/notification_service.h" | 36 #include "chrome/common/notification_service.h" |
| 38 #include "chrome/common/notification_source.h" | 37 #include "chrome/common/notification_source.h" |
| 39 #include "chrome/common/notification_type.h" | 38 #include "chrome/common/notification_type.h" |
| 40 #include "gfx/canvas.h" | 39 #include "gfx/canvas.h" |
| 41 #include "gfx/insets.h" | 40 #include "gfx/insets.h" |
| 42 #include "gfx/native_widget_types.h" | 41 #include "gfx/native_widget_types.h" |
| 43 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
| 44 #include "grit/theme_resources.h" | 43 #include "grit/theme_resources.h" |
| 45 #include "ui/base/animation/slide_animation.h" | 44 #include "ui/base/animation/slide_animation.h" |
| 45 #include "ui/base/resource/resource_bundle.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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 418 |
| 419 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { | 419 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { |
| 420 options_menu_->PopupAsContext(gtk_get_current_event_time()); | 420 options_menu_->PopupAsContext(gtk_get_current_event_time()); |
| 421 } | 421 } |
| 422 | 422 |
| 423 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { | 423 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { |
| 424 frame_container_ = NULL; | 424 frame_container_ = NULL; |
| 425 Close(false); | 425 Close(false); |
| 426 return FALSE; // Propagate. | 426 return FALSE; // Propagate. |
| 427 } | 427 } |
| OLD | NEW |