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_theme_provider.h" | |
19 #include "chrome/browser/browser_window.h" | 18 #include "chrome/browser/browser_window.h" |
20 #include "chrome/browser/extensions/extension_host.h" | 19 #include "chrome/browser/extensions/extension_host.h" |
21 #include "chrome/browser/extensions/extension_process_manager.h" | 20 #include "chrome/browser/extensions/extension_process_manager.h" |
22 #include "chrome/browser/gtk/custom_button.h" | 21 #include "chrome/browser/gtk/custom_button.h" |
23 #include "chrome/browser/gtk/gtk_theme_provider.h" | 22 #include "chrome/browser/gtk/gtk_theme_provider.h" |
24 #include "chrome/browser/gtk/gtk_util.h" | 23 #include "chrome/browser/gtk/gtk_util.h" |
25 #include "chrome/browser/gtk/info_bubble_gtk.h" | 24 #include "chrome/browser/gtk/info_bubble_gtk.h" |
26 #include "chrome/browser/gtk/menu_gtk.h" | 25 #include "chrome/browser/gtk/menu_gtk.h" |
27 #include "chrome/browser/gtk/notifications/balloon_view_host_gtk.h" | 26 #include "chrome/browser/gtk/notifications/balloon_view_host_gtk.h" |
28 #include "chrome/browser/gtk/rounded_window.h" | 27 #include "chrome/browser/gtk/rounded_window.h" |
29 #include "chrome/browser/notifications/balloon.h" | 28 #include "chrome/browser/notifications/balloon.h" |
30 #include "chrome/browser/notifications/desktop_notification_service.h" | 29 #include "chrome/browser/notifications/desktop_notification_service.h" |
31 #include "chrome/browser/notifications/notification_options_menu_model.h" | 30 #include "chrome/browser/notifications/notification_options_menu_model.h" |
32 #include "chrome/browser/profile.h" | 31 #include "chrome/browser/profile.h" |
33 #include "chrome/browser/renderer_host/render_view_host.h" | 32 #include "chrome/browser/renderer_host/render_view_host.h" |
34 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 33 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 34 #include "chrome/browser/themes/browser_theme_provider.h" |
35 #include "chrome/common/extensions/extension.h" | 35 #include "chrome/common/extensions/extension.h" |
36 #include "chrome/common/notification_details.h" | 36 #include "chrome/common/notification_details.h" |
37 #include "chrome/common/notification_service.h" | 37 #include "chrome/common/notification_service.h" |
38 #include "chrome/common/notification_source.h" | 38 #include "chrome/common/notification_source.h" |
39 #include "chrome/common/notification_type.h" | 39 #include "chrome/common/notification_type.h" |
40 #include "gfx/canvas.h" | 40 #include "gfx/canvas.h" |
41 #include "gfx/gtk_util.h" | 41 #include "gfx/gtk_util.h" |
42 #include "gfx/insets.h" | 42 #include "gfx/insets.h" |
43 #include "gfx/native_widget_types.h" | 43 #include "gfx/native_widget_types.h" |
44 #include "grit/generated_resources.h" | 44 #include "grit/generated_resources.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 410 |
411 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { | 411 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { |
412 options_menu_->PopupAsContext(gtk_get_current_event_time()); | 412 options_menu_->PopupAsContext(gtk_get_current_event_time()); |
413 } | 413 } |
414 | 414 |
415 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { | 415 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { |
416 frame_container_ = NULL; | 416 frame_container_ = NULL; |
417 Close(false); | 417 Close(false); |
418 return FALSE; // Propagate. | 418 return FALSE; // Propagate. |
419 } | 419 } |
OLD | NEW |