Bluetooth: don't connect to unconnectable devices or disconnect
[chromium-blink-merge.git] / ash / system / tray / tray_item_more.h
blob49287240d4065c0ffe4cd09532baf74f14280b7f
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.
5 #ifndef ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
6 #define ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_
8 #include "ash/system/tray/actionable_view.h"
9 #include "ui/views/view.h"
11 namespace views {
12 class ImageView;
13 class Label;
14 class View;
17 namespace ash {
19 class SystemTrayItem;
21 namespace internal {
23 // A view with a chevron ('>') on the right edge. Clicking on the view brings up
24 // the detailed view of the tray-item that owns it.
25 class TrayItemMore : public ActionableView {
26 public:
27 TrayItemMore(SystemTrayItem* owner, bool show_more);
28 virtual ~TrayItemMore();
30 SystemTrayItem* owner() const { return owner_; }
32 void SetLabel(const base::string16& label);
33 void SetImage(const gfx::ImageSkia* image_skia);
34 void SetAccessibleName(const base::string16& name);
36 protected:
37 // Replaces the default icon (on the left of the label), and allows a custom
38 // view to be placed there. Once the default icon is replaced, |SetImage|
39 // should never be called.
40 void ReplaceIcon(views::View* view);
42 private:
43 // Overridden from ActionableView.
44 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
46 // Overridden from views::View.
47 virtual void Layout() OVERRIDE;
48 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
50 SystemTrayItem* owner_;
51 // True if |more_| should be shown.
52 bool show_more_;
53 views::ImageView* icon_;
54 views::Label* label_;
55 views::ImageView* more_;
56 base::string16 accessible_name_;
58 DISALLOW_COPY_AND_ASSIGN(TrayItemMore);
61 } // namespace internal
62 } // namespace ash
64 #endif // ASH_SYSTEM_TRAY_TRAY_ITEM_MORE_H_