summaryrefslogtreecommitdiff
path: root/chromium/ash/system/chromeos/label_tray_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ash/system/chromeos/label_tray_view.h')
-rw-r--r--chromium/ash/system/chromeos/label_tray_view.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/chromium/ash/system/chromeos/label_tray_view.h b/chromium/ash/system/chromeos/label_tray_view.h
new file mode 100644
index 00000000000..b29c37bee56
--- /dev/null
+++ b/chromium/ash/system/chromeos/label_tray_view.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_
+#define ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_
+
+#include "base/strings/string16.h"
+#include "ui/views/view.h"
+
+namespace ash {
+namespace internal {
+
+class ViewClickListener;
+
+// View for simple information in tray. Automatically hides when message is
+// empty. Supports multiline messages.
+
+class LabelTrayView : public views::View {
+ public:
+ LabelTrayView(ViewClickListener* click_listener, int icon_resource_id);
+ virtual ~LabelTrayView();
+ void SetMessage(const base::string16& message);
+ private:
+ views::View* CreateChildView(const base::string16& message) const;
+
+ ViewClickListener* click_listener_;
+ int icon_resource_id_;
+ base::string16 message_;
+
+ DISALLOW_COPY_AND_ASSIGN(LabelTrayView);
+};
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_