1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ash / system / tray / tray_info_label.h [blame]
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SYSTEM_TRAY_TRAY_INFO_LABEL_H_
#define ASH_SYSTEM_TRAY_TRAY_INFO_LABEL_H_
#include "ash/ash_export.h"
#include "base/memory/raw_ptr.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/controls/label.h"
#include "ui/views/view.h"
namespace ash {
// A view containing only a label, which is to be inserted as a
// row within a system menu detailed view (e.g., the "Scanning for devices..."
// message that can appear at the top of the Bluetooth detailed view).
class ASH_EXPORT TrayInfoLabel : public views::View {
METADATA_HEADER(TrayInfoLabel, views::View)
public:
explicit TrayInfoLabel(int message_id);
TrayInfoLabel(const TrayInfoLabel&) = delete;
TrayInfoLabel& operator=(const TrayInfoLabel&) = delete;
~TrayInfoLabel() override;
// Updates the TrayInfoLabel to display the message associated with
// |message_id|.
void Update(int message_id);
const views::Label* label() { return label_; }
private:
const raw_ptr<views::Label> label_;
};
} // namespace ash
#endif // ASH_SYSTEM_TRAY_TRAY_INFO_LABEL_H_