Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: ash/common/system/cast/tray_cast.h

Issue 2424183002: Remove Chromecast extension support from cast system tray menu. (Closed)
Patch Set: Initial patch Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_CAST_TRAY_CAST_H_ 5 #ifndef ASH_COMMON_SYSTEM_CAST_TRAY_CAST_H_
6 #define ASH_COMMON_SYSTEM_CAST_TRAY_CAST_H_ 6 #define ASH_COMMON_SYSTEM_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void DestroyTrayView() override; 43 void DestroyTrayView() override;
44 void DestroyDefaultView() override; 44 void DestroyDefaultView() override;
45 void DestroyDetailedView() override; 45 void DestroyDetailedView() override;
46 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; 46 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
47 47
48 // Overridden from ShellObserver. 48 // Overridden from ShellObserver.
49 void OnCastingSessionStartedOrStopped(bool started) override; 49 void OnCastingSessionStartedOrStopped(bool started) override;
50 50
51 // Overridden from CastConfigDelegate::Observer. 51 // Overridden from CastConfigDelegate::Observer.
52 void OnDevicesUpdated( 52 void OnDevicesUpdated(
53 const CastConfigDelegate::ReceiversAndActivities& devices) override; 53 const CastConfigDelegate::SinksAndRoutes& devices) override;
54
55 // Returns true if the cast extension was detected.
56 bool HasCastExtension();
57 54
58 // This makes sure that the current view displayed in the tray is the correct 55 // This makes sure that the current view displayed in the tray is the correct
59 // one, depending on if we are currently casting. If we're casting, then a 56 // one, depending on if we are currently casting. If we're casting, then a
60 // view with a stop button is displayed; otherwise, a view that links to a 57 // view with a stop button is displayed; otherwise, a view that links to a
61 // detail view is displayed instead that allows the user to easily begin a 58 // detail view is displayed instead that allows the user to easily begin a
62 // casting session. 59 // casting session.
63 void UpdatePrimaryView(); 60 void UpdatePrimaryView();
64 61
65 CastConfigDelegate::ReceiversAndActivities receivers_and_activities_; 62 // Returns true if there is an active cast route. The route may be DIAL based,
66 bool is_casting_ = false; 63 // such as casting YouTube where the cast sink directly streams content from
64 // another server. In that case, is_mirror_casting_ will be false since this
65 // device is not actively transmitting information to the cast sink.
66 bool HasActiveRoute();
67 67
68 bool added_observer_ = false; 68 CastConfigDelegate::SinksAndRoutes sinks_and_routes_;
69
70 // True if there is a mirror-based cast session and the active-cast tray icon
71 // should be shown.
72 bool is_mirror_casting_ = false;
69 73
70 // Not owned. 74 // Not owned.
71 tray::CastTrayView* tray_ = nullptr; 75 tray::CastTrayView* tray_ = nullptr;
72 tray::CastDuplexView* default_ = nullptr; 76 tray::CastDuplexView* default_ = nullptr;
73 tray::CastDetailedView* detailed_ = nullptr; 77 tray::CastDetailedView* detailed_ = nullptr;
74 78
75 DISALLOW_COPY_AND_ASSIGN(TrayCast); 79 DISALLOW_COPY_AND_ASSIGN(TrayCast);
76 }; 80 };
77 81
78 } // namespace ash 82 } // namespace ash
79 83
80 #endif // ASH_COMMON_SYSTEM_CAST_TRAY_CAST_H_ 84 #endif // ASH_COMMON_SYSTEM_CAST_TRAY_CAST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698