Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: ui/message_center/views/notification_view.cc

Issue 1979583003: Support notifications with custom content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@messageview-close-button
Patch Set: fix mac build, attempt 2 Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/views/notification_view.h ('k') | ui/message_center/views/notification_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/notification_view.cc
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index 301f94f4447f3ea0a1a7273c291196ceba8ea372..4e6246c675276a98ff6ac714740a3f800e20b9c9 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -50,10 +50,6 @@
#include "ui/views/widget/widget.h"
#include "url/gurl.h"
-#if defined(OS_WIN)
-#include "ui/base/win/shell.h"
-#endif
-
namespace {
// Dimensions.
@@ -146,49 +142,6 @@ namespace message_center {
// NotificationView ////////////////////////////////////////////////////////////
-// static
-MessageView* NotificationView::Create(MessageCenterController* controller,
- const Notification& notification,
- bool top_level) {
- switch (notification.type()) {
- case NOTIFICATION_TYPE_BASE_FORMAT:
- case NOTIFICATION_TYPE_IMAGE:
- case NOTIFICATION_TYPE_MULTIPLE:
- case NOTIFICATION_TYPE_SIMPLE:
- case NOTIFICATION_TYPE_PROGRESS:
- break;
- default:
- // If the caller asks for an unrecognized kind of view (entirely possible
- // if an application is running on an older version of this code that
- // doesn't have the requested kind of notification template), we'll fall
- // back to a notification instance that will provide at least basic
- // functionality.
- LOG(WARNING) << "Unable to fulfill request for unrecognized "
- << "notification type " << notification.type() << ". "
- << "Falling back to simple notification type.";
- }
-
- // Currently all roads lead to the generic NotificationView.
- NotificationView* notification_view =
- new NotificationView(controller, notification);
-
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- // Don't create shadows for notification toasts on linux wih aura.
- if (top_level)
- return notification_view;
-#endif
-
-#if defined(OS_WIN)
- // Don't create shadows for notifications on Windows under classic theme.
- if (top_level && !ui::win::IsAeroGlassEnabled()) {
- return notification_view;
- }
-#endif // OS_WIN
-
- notification_view->CreateShadowBorder();
- return notification_view;
-}
-
views::View* NotificationView::TargetForRect(views::View* root,
const gfx::Rect& rect) {
CHECK_EQ(root, this);
« no previous file with comments | « ui/message_center/views/notification_view.h ('k') | ui/message_center/views/notification_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698