| 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_DATE_DATE_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_DATE_DATE_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_DATE_DATE_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_DATE_DATE_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // Updates the format of the displayed time. | 81 // Updates the format of the displayed time. |
| 82 void UpdateTimeFormat(); | 82 void UpdateTimeFormat(); |
| 83 | 83 |
| 84 base::HourClockType GetHourTypeForTesting() const; | 84 base::HourClockType GetHourTypeForTesting() const; |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 // Sets active rendering state and updates the color of |date_label_|. | 87 // Sets active rendering state and updates the color of |date_label_|. |
| 88 void SetActive(bool active); | 88 void SetActive(bool active); |
| 89 | 89 |
| 90 // Updates the style of |date_label_| based on the current native theme. | |
| 91 void UpdateStyle(); | |
| 92 | |
| 93 // BaseDateTimeView: | 90 // BaseDateTimeView: |
| 94 void UpdateTextInternal(const base::Time& now) override; | 91 void UpdateTextInternal(const base::Time& now) override; |
| 95 | 92 |
| 96 // ActionableView: | 93 // ActionableView: |
| 97 bool PerformAction(const ui::Event& event) override; | 94 bool PerformAction(const ui::Event& event) override; |
| 98 | 95 |
| 99 // views::View: | 96 // views::View: |
| 100 void OnMouseEntered(const ui::MouseEvent& event) override; | 97 void OnMouseEntered(const ui::MouseEvent& event) override; |
| 101 void OnMouseExited(const ui::MouseEvent& event) override; | 98 void OnMouseExited(const ui::MouseEvent& event) override; |
| 102 void OnGestureEvent(ui::GestureEvent* event) override; | 99 void OnGestureEvent(ui::GestureEvent* event) override; |
| 103 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | |
| 104 | 100 |
| 105 views::Label* date_label_; | 101 views::Label* date_label_; |
| 106 | 102 |
| 107 DateAction action_; | 103 DateAction action_; |
| 108 | 104 |
| 109 DISALLOW_COPY_AND_ASSIGN(DateView); | 105 DISALLOW_COPY_AND_ASSIGN(DateView); |
| 110 }; | 106 }; |
| 111 | 107 |
| 112 // Tray view used to display the current time. | 108 // Tray view used to display the current time. |
| 113 // Exported for tests. | 109 // Exported for tests. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 std::unique_ptr<views::Label> vertical_label_hours_; | 149 std::unique_ptr<views::Label> vertical_label_hours_; |
| 154 std::unique_ptr<views::Label> vertical_label_minutes_; | 150 std::unique_ptr<views::Label> vertical_label_minutes_; |
| 155 | 151 |
| 156 DISALLOW_COPY_AND_ASSIGN(TimeView); | 152 DISALLOW_COPY_AND_ASSIGN(TimeView); |
| 157 }; | 153 }; |
| 158 | 154 |
| 159 } // namespace tray | 155 } // namespace tray |
| 160 } // namespace ash | 156 } // namespace ash |
| 161 | 157 |
| 162 #endif // ASH_COMMON_SYSTEM_DATE_DATE_VIEW_H_ | 158 #endif // ASH_COMMON_SYSTEM_DATE_DATE_VIEW_H_ |
| OLD | NEW |