This source file includes following definitions.
- IsRichNotificationEnabled
- GetMessageCenterShowState
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
#if defined(OS_MACOSX) || defined(USE_AURA)
return true;
#else
return false;
#endif
}
MessageCenterShowState GetMessageCenterShowState() {
#if defined(OS_MACOSX)
std::string tray_behavior =
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kNotificationCenterTrayBehavior);
if (tray_behavior == "never")
return MESSAGE_CENTER_SHOW_NEVER;
if (tray_behavior == "always")
return MESSAGE_CENTER_SHOW_ALWAYS;
if (tray_behavior == "unread")
return MESSAGE_CENTER_SHOW_UNREAD;
return MESSAGE_CENTER_SHOW_AFTER_FIRST;
#elif defined(OS_CHROMEOS)
return MESSAGE_CENTER_SHOW_UNREAD;
#else
return MESSAGE_CENTER_SHOW_AFTER_FIRST;
#endif
}
}