| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_SCREEN_SECURITY_SCREEN_TRAY_ITEM_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_TRAY_ITEM_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_TRAY_ITEM_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_TRAY_ITEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Overridden from views::ButtonListener. | 49 // Overridden from views::ButtonListener. |
| 50 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 50 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 51 | 51 |
| 52 void CreateItems(); | 52 void CreateItems(); |
| 53 void UpdateFromScreenTrayItem(); | 53 void UpdateFromScreenTrayItem(); |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 views::ImageView* icon() { return icon_; } | 56 views::ImageView* icon() { return icon_; } |
| 57 views::Label* label() { return label_; } | 57 views::Label* label() { return label_; } |
| 58 views::Button* stop_button() { return stop_button_; } |
| 58 | 59 |
| 59 // Overridden from views::View: | 60 // Overridden from views::View: |
| 60 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 61 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 // The controller for this view. May be null. | 64 // The controller for this view. May be null. |
| 64 ScreenTrayItem* screen_tray_item_; | 65 ScreenTrayItem* screen_tray_item_; |
| 65 views::ImageView* icon_; | 66 views::ImageView* icon_; |
| 66 views::Label* label_; | 67 views::Label* label_; |
| 67 views::View* stop_button_; | 68 views::Button* stop_button_; |
| 68 base::string16 label_text_; | 69 base::string16 label_text_; |
| 69 base::string16 stop_button_text_; | 70 base::string16 stop_button_text_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(ScreenStatusView); | 72 DISALLOW_COPY_AND_ASSIGN(ScreenStatusView); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 class ScreenNotificationDelegate : public message_center::NotificationDelegate { | 75 class ScreenNotificationDelegate : public message_center::NotificationDelegate { |
| 75 public: | 76 public: |
| 76 explicit ScreenNotificationDelegate(ScreenTrayItem* screen_tray); | 77 explicit ScreenNotificationDelegate(ScreenTrayItem* screen_tray); |
| 77 | 78 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 tray::ScreenStatusView* default_view_; | 135 tray::ScreenStatusView* default_view_; |
| 135 bool is_started_; | 136 bool is_started_; |
| 136 base::Closure stop_callback_; | 137 base::Closure stop_callback_; |
| 137 | 138 |
| 138 DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); | 139 DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } // namespace ash | 142 } // namespace ash |
| 142 | 143 |
| 143 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_TRAY_ITEM_H_ | 144 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_TRAY_ITEM_H_ |
| OLD | NEW |