| 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_item.h" | 10 #include "ash/common/system/tray/system_tray_item.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void Update(); | 110 void Update(); |
| 111 void Start(const base::Closure& stop_callback); | 111 void Start(const base::Closure& stop_callback); |
| 112 void Stop(); | 112 void Stop(); |
| 113 | 113 |
| 114 // Creates or updates the notification for the tray item. | 114 // Creates or updates the notification for the tray item. |
| 115 virtual void CreateOrUpdateNotification() = 0; | 115 virtual void CreateOrUpdateNotification() = 0; |
| 116 | 116 |
| 117 // Returns the id of the notification for the tray item. | 117 // Returns the id of the notification for the tray item. |
| 118 virtual std::string GetNotificationId() = 0; | 118 virtual std::string GetNotificationId() = 0; |
| 119 | 119 |
| 120 // Called after Stop() is invoked from the default view. |
| 121 virtual void RecordStoppedFromDefaultViewMetric(); |
| 122 |
| 123 // Called after Stop() is invoked from the notification view. |
| 124 virtual void RecordStoppedFromNotificationViewMetric(); |
| 125 |
| 120 // Overridden from SystemTrayItem. | 126 // Overridden from SystemTrayItem. |
| 121 views::View* CreateTrayView(LoginStatus status) override = 0; | 127 views::View* CreateTrayView(LoginStatus status) override = 0; |
| 122 views::View* CreateDefaultView(LoginStatus status) override = 0; | 128 views::View* CreateDefaultView(LoginStatus status) override = 0; |
| 123 void DestroyTrayView() override; | 129 void DestroyTrayView() override; |
| 124 void DestroyDefaultView() override; | 130 void DestroyDefaultView() override; |
| 125 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; | 131 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; |
| 126 | 132 |
| 127 private: | 133 private: |
| 128 tray::ScreenTrayView* tray_view_; | 134 tray::ScreenTrayView* tray_view_; |
| 129 tray::ScreenStatusView* default_view_; | 135 tray::ScreenStatusView* default_view_; |
| 130 bool is_started_; | 136 bool is_started_; |
| 131 base::Closure stop_callback_; | 137 base::Closure stop_callback_; |
| 132 | 138 |
| 133 DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); | 139 DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); |
| 134 }; | 140 }; |
| 135 | 141 |
| 136 } // namespace ash | 142 } // namespace ash |
| 137 | 143 |
| 138 #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 |