| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/notifications/balloon_view_gtk.h" | 5 #include "chrome/browser/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" | 13 #include "app/resource_bundle.h" |
| 14 #include "app/slide_animation.h" | 14 #include "app/slide_animation.h" |
| 15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "chrome/browser/browser_list.h" | 17 #include "chrome/browser/browser_list.h" |
| 18 #include "chrome/browser/browser_window.h" | 18 #include "chrome/browser/browser_window.h" |
| 19 #include "chrome/browser/extensions/extension_host.h" | 19 #include "chrome/browser/extensions/extension_host.h" |
| 20 #include "chrome/browser/extensions/extension_process_manager.h" | 20 #include "chrome/browser/extensions/extension_process_manager.h" |
| 21 #include "chrome/browser/gtk/custom_button.h" | 21 #include "chrome/browser/gtk/custom_button.h" |
| 22 #include "chrome/browser/gtk/gtk_theme_provider.h" | 22 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 23 #include "chrome/browser/gtk/gtk_util.h" | 23 #include "chrome/browser/gtk/gtk_util.h" |
| 24 #include "chrome/browser/gtk/info_bubble_gtk.h" | 24 #include "chrome/browser/gtk/info_bubble_gtk.h" |
| 25 #include "chrome/browser/gtk/menu_gtk.h" | 25 #include "chrome/browser/gtk/menu_gtk.h" |
| 26 #include "chrome/browser/gtk/notifications/balloon_view_host_gtk.h" | 26 #include "chrome/browser/gtk/notifications/balloon_view_host_gtk.h" |
| 27 #include "chrome/browser/gtk/rounded_window.h" | 27 #include "chrome/browser/gtk/rounded_window.h" |
| 28 #include "chrome/browser/notifications/balloon.h" | 28 #include "chrome/browser/notifications/balloon.h" |
| 29 #include "chrome/browser/notifications/desktop_notification_service.h" | 29 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 30 #include "chrome/browser/notifications/notification.h" |
| 30 #include "chrome/browser/notifications/notification_options_menu_model.h" | 31 #include "chrome/browser/notifications/notification_options_menu_model.h" |
| 31 #include "chrome/browser/profile.h" | 32 #include "chrome/browser/profile.h" |
| 32 #include "chrome/browser/renderer_host/render_view_host.h" | 33 #include "chrome/browser/renderer_host/render_view_host.h" |
| 33 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 34 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 34 #include "chrome/browser/themes/browser_theme_provider.h" | 35 #include "chrome/browser/themes/browser_theme_provider.h" |
| 35 #include "chrome/common/extensions/extension.h" | 36 #include "chrome/common/extensions/extension.h" |
| 36 #include "chrome/common/notification_details.h" | 37 #include "chrome/common/notification_details.h" |
| 37 #include "chrome/common/notification_service.h" | 38 #include "chrome/common/notification_service.h" |
| 38 #include "chrome/common/notification_source.h" | 39 #include "chrome/common/notification_source.h" |
| 39 #include "chrome/common/notification_type.h" | 40 #include "chrome/common/notification_type.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 414 |
| 414 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { | 415 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { |
| 415 options_menu_->PopupAsContext(gtk_get_current_event_time()); | 416 options_menu_->PopupAsContext(gtk_get_current_event_time()); |
| 416 } | 417 } |
| 417 | 418 |
| 418 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { | 419 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { |
| 419 frame_container_ = NULL; | 420 frame_container_ = NULL; |
| 420 Close(false); | 421 Close(false); |
| 421 return FALSE; // Propagate. | 422 return FALSE; // Propagate. |
| 422 } | 423 } |
| OLD | NEW |