OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gfx/canvas.h" | |
10 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
11 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
12 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
13 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/browser_theme_provider.h" | 13 #include "chrome/browser/browser_theme_provider.h" |
15 #include "chrome/browser/notifications/balloon.h" | 14 #include "chrome/browser/notifications/balloon.h" |
16 #include "chrome/browser/notifications/balloon_collection.h" | 15 #include "chrome/browser/notifications/balloon_collection.h" |
17 #include "chrome/browser/notifications/desktop_notification_service.h" | 16 #include "chrome/browser/notifications/desktop_notification_service.h" |
18 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profile.h" |
19 #include "chrome/browser/renderer_host/render_view_host.h" | 18 #include "chrome/browser/renderer_host/render_view_host.h" |
20 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 19 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
21 #include "chrome/browser/views/notifications/balloon_view_host.h" | 20 #include "chrome/browser/views/notifications/balloon_view_host.h" |
22 #include "chrome/common/notification_details.h" | 21 #include "chrome/common/notification_details.h" |
23 #include "chrome/common/notification_source.h" | 22 #include "chrome/common/notification_source.h" |
24 #include "chrome/common/notification_type.h" | 23 #include "chrome/common/notification_type.h" |
| 24 #include "gfx/canvas.h" |
25 #include "gfx/insets.h" | 25 #include "gfx/insets.h" |
26 #include "gfx/native_widget_types.h" | 26 #include "gfx/native_widget_types.h" |
27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
29 #include "views/controls/button/button.h" | 29 #include "views/controls/button/button.h" |
30 #include "views/controls/button/text_button.h" | 30 #include "views/controls/button/text_button.h" |
31 #include "views/controls/menu/menu_2.h" | 31 #include "views/controls/menu/menu_2.h" |
32 #include "views/controls/native/native_view_host.h" | 32 #include "views/controls/native/native_view_host.h" |
33 #include "views/painter.h" | 33 #include "views/painter.h" |
34 #include "views/widget/root_view.h" | 34 #include "views/widget/root_view.h" |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 NOTREACHED(); | 496 NOTREACHED(); |
497 return; | 497 return; |
498 } | 498 } |
499 | 499 |
500 // If the renderer process attached to this balloon is disconnected | 500 // If the renderer process attached to this balloon is disconnected |
501 // (e.g., because of a crash), we want to close the balloon. | 501 // (e.g., because of a crash), we want to close the balloon. |
502 notification_registrar_.Remove(this, | 502 notification_registrar_.Remove(this, |
503 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); | 503 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); |
504 Close(false); | 504 Close(false); |
505 } | 505 } |
OLD | NEW |