| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_ | |
| 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/views/controls/button/custom_button.h" | |
| 10 | |
| 11 namespace views { | |
| 12 class Label; | |
| 13 } | |
| 14 | |
| 15 namespace ash { | |
| 16 | |
| 17 // A button with a bar image and title text below the bar image. These buttons | |
| 18 // will be used in audio and brightness control UI, which can be toggled with | |
| 19 // on/off states. | |
| 20 class TrayBarButtonWithTitle : public views::CustomButton { | |
| 21 public: | |
| 22 TrayBarButtonWithTitle(views::ButtonListener* listener, | |
| 23 int title_id, | |
| 24 int width); | |
| 25 ~TrayBarButtonWithTitle() override; | |
| 26 | |
| 27 void UpdateButton(bool control_on); | |
| 28 | |
| 29 private: | |
| 30 class TrayBarButton; | |
| 31 | |
| 32 // Overridden from views::CustomButton: | |
| 33 gfx::Size GetPreferredSize() const override; | |
| 34 void Layout() override; | |
| 35 | |
| 36 TrayBarButton* image_; | |
| 37 views::Label* title_; | |
| 38 int width_; | |
| 39 int image_height_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(TrayBarButtonWithTitle); | |
| 42 }; | |
| 43 | |
| 44 } // namespace ash | |
| 45 | |
| 46 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_BAR_BUTTON_WITH_TITLE_H_ | |
| OLD | NEW |