1 // Copyright 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 "ash/system/system_notifier.h"
7 #include "base/logging.h"
10 namespace system_notifier {
14 // See http://dev.chromium.org/chromium-os/chromiumos-design-docs/
15 // system-notifications for the reasoning.
16 const AshSystemComponentNotifierType kAlwaysShownNotifierIds[] = {
18 NOTIFIER_DISPLAY_ERROR,
24 std::string SystemComponentTypeToString(AshSystemComponentNotifierType type) {
25 if (type == NOTIFIER_SCREENSHOT)
28 // TODO(mukai): fill the names of other components.
33 bool ShouldAlwaysShowPopups(const message_center::NotifierId& notifier_id) {
34 if (notifier_id.type != message_center::NotifierId::SYSTEM_COMPONENT)
37 for (size_t i = 0; i < arraysize(kAlwaysShownNotifierIds); ++i) {
38 if (notifier_id.system_component_type == kAlwaysShownNotifierIds[i])
44 } // namespace system_notifier