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