| 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" | 9 #include "app/gfx/canvas.h" |
| 10 #include "app/gfx/insets.h" | 10 #include "app/gfx/insets.h" |
| 11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
| 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 "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/string_util.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/browser/browser_theme_provider.h" | 16 #include "chrome/browser/browser_theme_provider.h" |
| 17 #include "chrome/browser/notifications/balloon.h" | 17 #include "chrome/browser/notifications/balloon.h" |
| 18 #include "chrome/browser/notifications/balloon_collection.h" | 18 #include "chrome/browser/notifications/balloon_collection.h" |
| 19 #include "chrome/browser/notifications/desktop_notification_service.h" | 19 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 20 #include "chrome/browser/profile.h" | 20 #include "chrome/browser/profile.h" |
| 21 #include "chrome/browser/renderer_host/render_view_host.h" | 21 #include "chrome/browser/renderer_host/render_view_host.h" |
| 22 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 22 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 23 #include "chrome/browser/views/notifications/balloon_view_host.h" | 23 #include "chrome/browser/views/notifications/balloon_view_host.h" |
| 24 #include "chrome/common/notification_details.h" | 24 #include "chrome/common/notification_details.h" |
| 25 #include "chrome/common/notification_source.h" | 25 #include "chrome/common/notification_source.h" |
| (...skipping 470 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 |