Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / ash / system / tray / tray_bar_button_with_title.h
blob8b63d4f8fa7434512d4dd4165997d03ba1c1ccdf
1 // Copyright 2013 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_BAR_BUTTON_WITH_TITLE_H_
6 #define ASH_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/views/controls/button/custom_button.h"
12 namespace views {
13 class Label;
16 namespace ash {
17 namespace internal {
19 // A button with a bar image and title text below the bar image. These buttons
20 // will be used in audio and brightness control UI, which can be toggled with
21 // on/off states.
22 class TrayBarButtonWithTitle : public views::CustomButton {
23 public:
24 TrayBarButtonWithTitle(views::ButtonListener* listener,
25 int title_id,
26 int width);
27 virtual ~TrayBarButtonWithTitle();
29 void UpdateButton(bool control_on);
31 private:
32 class TrayBarButton;
34 // Overridden from views::CustomButton:
35 virtual gfx::Size GetPreferredSize() OVERRIDE;
36 virtual void Layout() OVERRIDE;
38 TrayBarButton* image_;
39 views::Label* title_;
40 int width_;
41 int image_height_;
43 DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle);
46 } // namespace internal
47 } // namespace ash
49 #endif // ASH_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_