tray_info_label.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2017 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_TRAY_TRAY_INFO_LABEL_H_
  5. #define ASH_SYSTEM_TRAY_TRAY_INFO_LABEL_H_
  6. #include "ash/ash_export.h"
  7. #include "ui/views/controls/label.h"
  8. #include "ui/views/view.h"
  9. namespace ash {
  10. // A view containing only a label, which is to be inserted as a
  11. // row within a system menu detailed view (e.g., the "Scanning for devices..."
  12. // message that can appear at the top of the Bluetooth detailed view).
  13. class ASH_EXPORT TrayInfoLabel : public views::View {
  14. public:
  15. explicit TrayInfoLabel(int message_id);
  16. TrayInfoLabel(const TrayInfoLabel&) = delete;
  17. TrayInfoLabel& operator=(const TrayInfoLabel&) = delete;
  18. ~TrayInfoLabel() override;
  19. // Updates the TrayInfoLabel to display the message associated with
  20. // |message_id|.
  21. void Update(int message_id);
  22. // views::View:
  23. const char* GetClassName() const override;
  24. const views::Label* label() { return label_; }
  25. private:
  26. views::Label* const label_;
  27. };
  28. } // namespace ash
  29. #endif // ASH_SYSTEM_TRAY_TRAY_INFO_LABEL_H_