1 // Copyright (c) 2012 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 5 #ifndef ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_ 6 #define ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_ 7 8 #include "base/strings/string16.h" 9 #include "ui/views/view.h" 10 11 namespace ash { 12 namespace internal { 13 14 class ViewClickListener; 15 16 // View for simple information in tray. Automatically hides when message is 17 // empty. Supports multiline messages. 18 19 class LabelTrayView : public views::View { 20 public: 21 LabelTrayView(ViewClickListener* click_listener, int icon_resource_id); 22 virtual ~LabelTrayView(); 23 void SetMessage(const base::string16& message); 24 private: 25 views::View* CreateChildView(const base::string16& message) const; 26 27 ViewClickListener* click_listener_; 28 int icon_resource_id_; 29 base::string16 message_; 30 31 DISALLOW_COPY_AND_ASSIGN(LabelTrayView); 32 }; 33 34 } // namespace internal 35 } // namespace ash 36 37 #endif // ASH_SYSTEM_CHROMEOS_LABEL_TRAY_VIEW_H_ 38