1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/message_center/message_center_util.h"
7 #include "base/command_line.h"
8 #include "ui/message_center/message_center_switches.h"
10 namespace message_center {
12 // TODO(dimich): remove this function when balloon notifications are removed
14 bool IsRichNotificationEnabled() {
15 #if defined(OS_MACOSX) || defined(USE_AURA)
22 MessageCenterShowState GetMessageCenterShowState() {
23 #if defined(OS_MACOSX)
24 std::string tray_behavior =
25 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
26 switches::kNotificationCenterTrayBehavior);
27 if (tray_behavior == "never")
28 return MESSAGE_CENTER_SHOW_NEVER;
29 if (tray_behavior == "always")
30 return MESSAGE_CENTER_SHOW_ALWAYS;
31 if (tray_behavior == "unread")
32 return MESSAGE_CENTER_SHOW_UNREAD;
33 return MESSAGE_CENTER_SHOW_AFTER_FIRST;
34 #elif defined(OS_CHROMEOS)
35 return MESSAGE_CENTER_SHOW_UNREAD;
36 #else // defined(OS_WIN) || defined(OS_LINUX)
37 return MESSAGE_CENTER_SHOW_AFTER_FIRST;
41 } // namespace message_center