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/views/notifications/balloon_view.h" | 5 #include "chrome/browser/views/notifications/balloon_view.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
11 #include "app/slide_animation.h" | 11 #include "app/slide_animation.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/notifications/balloon.h" | 14 #include "chrome/browser/notifications/balloon.h" |
15 #include "chrome/browser/notifications/balloon_collection.h" | 15 #include "chrome/browser/notifications/balloon_collection.h" |
16 #include "chrome/browser/notifications/desktop_notification_service.h" | 16 #include "chrome/browser/notifications/desktop_notification_service.h" |
17 #include "chrome/browser/notifications/notification.h" | 17 #include "chrome/browser/notifications/notification.h" |
18 #include "chrome/browser/notifications/notification_options_menu_model.h" | 18 #include "chrome/browser/notifications/notification_options_menu_model.h" |
19 #include "chrome/browser/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/renderer_host/render_view_host.h" | 20 #include "chrome/browser/renderer_host/render_view_host.h" |
21 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 21 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
22 #include "chrome/browser/themes/browser_theme_provider.h" | 22 #include "chrome/browser/themes/browser_theme_provider.h" |
23 #include "chrome/browser/views/bubble_border.h" | 23 #include "chrome/browser/views/bubble_border.h" |
24 #include "chrome/browser/views/notifications/balloon_view_host.h" | 24 #include "chrome/browser/views/notifications/balloon_view_host.h" |
25 #include "chrome/common/notification_details.h" | 25 #include "chrome/common/notification_details.h" |
26 #include "chrome/common/notification_source.h" | 26 #include "chrome/common/notification_source.h" |
27 #include "chrome/common/notification_type.h" | 27 #include "chrome/common/notification_type.h" |
28 #include "gfx/canvas_skia.h" | 28 #include "gfx/canvas_skia.h" |
29 #include "gfx/insets.h" | 29 #include "gfx/insets.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 NOTREACHED(); | 495 NOTREACHED(); |
496 return; | 496 return; |
497 } | 497 } |
498 | 498 |
499 // If the renderer process attached to this balloon is disconnected | 499 // If the renderer process attached to this balloon is disconnected |
500 // (e.g., because of a crash), we want to close the balloon. | 500 // (e.g., because of a crash), we want to close the balloon. |
501 notification_registrar_.Remove(this, | 501 notification_registrar_.Remove(this, |
502 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); | 502 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); |
503 Close(false); | 503 Close(false); |
504 } | 504 } |
OLD | NEW |