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

Unified Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth.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
« no previous file with comments | « no previous file | ash/common/system/chromeos/cast/tray_cast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
diff --git a/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc b/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
index 6ad8627c428dbc0d52a8b3303e74a458e55bf8b0..8e573fcb120a3d1022beba8c94008d52bfa2609a 100644
--- a/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
+++ b/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
@@ -112,9 +112,7 @@ const int kDisabledPanelLabelBaselineY = 20;
class BluetoothDefaultView : public TrayItemMore {
public:
- BluetoothDefaultView(SystemTrayItem* owner, bool show_more)
- : TrayItemMore(owner, show_more) {}
-
+ explicit BluetoothDefaultView(SystemTrayItem* owner) : TrayItemMore(owner) {}
~BluetoothDefaultView() override {}
void Update() {
@@ -136,9 +134,10 @@ class BluetoothDefaultView : public TrayItemMore {
protected:
// TrayItemMore:
- std::unique_ptr<TrayPopupItemStyle> CreateStyle() const override {
+ std::unique_ptr<TrayPopupItemStyle> HandleCreateStyle() const override {
SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
- std::unique_ptr<TrayPopupItemStyle> style = TrayItemMore::CreateStyle();
+ std::unique_ptr<TrayPopupItemStyle> style =
+ TrayItemMore::HandleCreateStyle();
style->set_color_style(
delegate->GetBluetoothEnabled()
? TrayPopupItemStyle::ColorStyle::ACTIVE
@@ -588,8 +587,8 @@ views::View* TrayBluetooth::CreateTrayView(LoginStatus status) {
views::View* TrayBluetooth::CreateDefaultView(LoginStatus status) {
CHECK(default_ == NULL);
- default_ =
- new tray::BluetoothDefaultView(this, status != LoginStatus::LOCKED);
+ default_ = new tray::BluetoothDefaultView(this);
+ default_->SetEnabled(status != LoginStatus::LOCKED);
default_->Update();
return default_;
}
« no previous file with comments | « no previous file | ash/common/system/chromeos/cast/tray_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698