| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/system/chromeos/power/power_status.h" | 9 #include "ash/common/system/chromeos/power/power_status.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public PowerStatus::Observer { | 22 public PowerStatus::Observer { |
| 23 public: | 23 public: |
| 24 explicit PowerStatusView(bool default_view_right_align); | 24 explicit PowerStatusView(bool default_view_right_align); |
| 25 ~PowerStatusView() override; | 25 ~PowerStatusView() override; |
| 26 | 26 |
| 27 // views::View: | 27 // views::View: |
| 28 gfx::Size GetPreferredSize() const override; | 28 gfx::Size GetPreferredSize() const override; |
| 29 int GetHeightForWidth(int width) const override; | 29 int GetHeightForWidth(int width) const override; |
| 30 void Layout() override; | 30 void Layout() override; |
| 31 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 31 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 32 void GetAccessibleState(ui::AXViewState* state) override; | 32 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 33 | 33 |
| 34 // PowerStatus::Observer: | 34 // PowerStatus::Observer: |
| 35 void OnPowerStatusChanged() override; | 35 void OnPowerStatusChanged() override; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 friend class PowerStatusViewTest; | 38 friend class PowerStatusViewTest; |
| 39 | 39 |
| 40 void LayoutView(); | 40 void LayoutView(); |
| 41 void UpdateText(); | 41 void UpdateText(); |
| 42 void UpdateStyle(); | 42 void UpdateStyle(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 // Only used in material design. | 62 // Only used in material design. |
| 63 base::string16 accessible_name_; | 63 base::string16 accessible_name_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(PowerStatusView); | 65 DISALLOW_COPY_AND_ASSIGN(PowerStatusView); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace ash | 68 } // namespace ash |
| 69 | 69 |
| 70 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ | 70 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_VIEW_H_ |
| OLD | NEW |