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

Unified Diff: ash/common/system/chromeos/cast/tray_cast.cc

Issue 2699443004: Modify TrayItemMore to use enabled status (Closed)
Patch Set: Rebased Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/cast/tray_cast.cc
diff --git a/ash/common/system/chromeos/cast/tray_cast.cc b/ash/common/system/chromeos/cast/tray_cast.cc
index 0e3705c5e310efa85e499eff60237d4cef933eb7..44df98f977463f6a1b50be0aa7dced36d01ee1f4 100644
--- a/ash/common/system/chromeos/cast/tray_cast.cc
+++ b/ash/common/system/chromeos/cast/tray_cast.cc
@@ -80,16 +80,15 @@ namespace tray {
// actually pick the cast receiver.
class CastSelectDefaultView : public TrayItemMore {
public:
- CastSelectDefaultView(SystemTrayItem* owner, bool show_more);
+ explicit CastSelectDefaultView(SystemTrayItem* owner);
~CastSelectDefaultView() override;
private:
DISALLOW_COPY_AND_ASSIGN(CastSelectDefaultView);
};
-CastSelectDefaultView::CastSelectDefaultView(SystemTrayItem* owner,
- bool show_more)
- : TrayItemMore(owner, show_more) {
+CastSelectDefaultView::CastSelectDefaultView(SystemTrayItem* owner)
+ : TrayItemMore(owner) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
// Update the image and label.
@@ -215,7 +214,7 @@ void CastCastView::ButtonPressed(views::Button* sender,
class CastDuplexView : public views::View {
public:
CastDuplexView(SystemTrayItem* owner,
- bool show_more,
+ bool enabled,
const std::vector<mojom::SinkAndRoutePtr>& sinks_routes);
~CastDuplexView() override;
@@ -243,9 +242,10 @@ class CastDuplexView : public views::View {
CastDuplexView::CastDuplexView(
SystemTrayItem* owner,
- bool show_more,
+ bool enabled,
const std::vector<mojom::SinkAndRoutePtr>& sinks_routes) {
- select_view_ = new CastSelectDefaultView(owner, show_more);
+ select_view_ = new CastSelectDefaultView(owner);
+ select_view_->SetEnabled(enabled);
cast_view_ = new CastCastView();
cast_view_->UpdateLabel(sinks_routes);
SetLayoutManager(new views::FillLayout());
« no previous file with comments | « ash/common/system/chromeos/bluetooth/tray_bluetooth.cc ('k') | ash/common/system/chromeos/network/tray_network.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698