| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CAST_TRAY_CAST_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_CAST_TRAY_CAST_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_CAST_TRAY_CAST_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_CAST_TRAY_CAST_H_ |
| 7 | 7 |
| 8 #include "ash/common/cast_config_delegate.h" | 8 #include "ash/common/cast_config_delegate.h" |
| 9 #include "ash/common/shell_observer.h" | 9 #include "ash/common/shell_observer.h" |
| 10 #include "ash/common/system/tray/system_tray_item.h" | 10 #include "ash/common/system/tray/system_tray_item.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void DestroyDefaultView() override; | 44 void DestroyDefaultView() override; |
| 45 void DestroyDetailedView() override; | 45 void DestroyDetailedView() override; |
| 46 | 46 |
| 47 // Overridden from ShellObserver. | 47 // Overridden from ShellObserver. |
| 48 void OnCastingSessionStartedOrStopped(bool started) override; | 48 void OnCastingSessionStartedOrStopped(bool started) override; |
| 49 | 49 |
| 50 // Overridden from CastConfigDelegate::Observer. | 50 // Overridden from CastConfigDelegate::Observer. |
| 51 void OnDevicesUpdated( | 51 void OnDevicesUpdated( |
| 52 const CastConfigDelegate::ReceiversAndActivities& devices) override; | 52 const CastConfigDelegate::ReceiversAndActivities& devices) override; |
| 53 | 53 |
| 54 // Returns true if the cast extension was detected. | |
| 55 bool HasCastExtension(); | |
| 56 | |
| 57 // This makes sure that the current view displayed in the tray is the correct | 54 // This makes sure that the current view displayed in the tray is the correct |
| 58 // one, depending on if we are currently casting. If we're casting, then a | 55 // one, depending on if we are currently casting. If we're casting, then a |
| 59 // view with a stop button is displayed; otherwise, a view that links to a | 56 // view with a stop button is displayed; otherwise, a view that links to a |
| 60 // detail view is displayed instead that allows the user to easily begin a | 57 // detail view is displayed instead that allows the user to easily begin a |
| 61 // casting session. | 58 // casting session. |
| 62 void UpdatePrimaryView(); | 59 void UpdatePrimaryView(); |
| 63 | 60 |
| 64 CastConfigDelegate::ReceiversAndActivities receivers_and_activities_; | 61 CastConfigDelegate::ReceiversAndActivities receivers_and_activities_; |
| 65 bool is_casting_ = false; | 62 bool is_casting_ = false; |
| 66 | 63 |
| 67 bool added_observer_ = false; | 64 bool added_observer_ = false; |
| 68 | 65 |
| 69 // Not owned. | 66 // Not owned. |
| 70 tray::CastTrayView* tray_ = nullptr; | 67 tray::CastTrayView* tray_ = nullptr; |
| 71 tray::CastDuplexView* default_ = nullptr; | 68 tray::CastDuplexView* default_ = nullptr; |
| 72 tray::CastDetailedView* detailed_ = nullptr; | 69 tray::CastDetailedView* detailed_ = nullptr; |
| 73 | 70 |
| 74 DISALLOW_COPY_AND_ASSIGN(TrayCast); | 71 DISALLOW_COPY_AND_ASSIGN(TrayCast); |
| 75 }; | 72 }; |
| 76 | 73 |
| 77 } // namespace ash | 74 } // namespace ash |
| 78 | 75 |
| 79 #endif // ASH_COMMON_SYSTEM_CHROMEOS_CAST_TRAY_CAST_H_ | 76 #endif // ASH_COMMON_SYSTEM_CHROMEOS_CAST_TRAY_CAST_H_ |
| OLD | NEW |