message_center_ui_delegate.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.
  4. #ifndef ASH_SYSTEM_MESSAGE_CENTER_MESSAGE_CENTER_UI_DELEGATE_H_
  5. #define ASH_SYSTEM_MESSAGE_CENTER_MESSAGE_CENTER_UI_DELEGATE_H_
  6. namespace ash {
  7. // A UiDelegate class is responsible for managing the various UI surfaces
  8. // (MessageCenter and popups) as notifications are added and updated.
  9. // Implementations are platform specific.
  10. class MessageCenterUiDelegate {
  11. public:
  12. virtual ~MessageCenterUiDelegate() {}
  13. // Called whenever a change to the visible UI has occurred.
  14. virtual void OnMessageCenterContentsChanged() = 0;
  15. // Display the popup bubbles for new notifications to the user. Returns true
  16. // if popups were actually displayed to the user.
  17. virtual bool ShowPopups() = 0;
  18. // Remove the popup bubbles from the UI.
  19. virtual void HidePopups() = 0;
  20. // Display the message center containing all undismissed notifications to the
  21. // user. Returns true if the center was actually displayed to the
  22. // user.
  23. virtual bool ShowMessageCenter() = 0;
  24. // Remove the message center from the UI.
  25. virtual void HideMessageCenter() = 0;
  26. };
  27. } // namespace ash
  28. #endif // ASH_SYSTEM_MESSAGE_CENTER_MESSAGE_CENTER_UI_DELEGATE_H_