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

Unified Diff: ash/common/system/chromeos/network/tray_network.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 | « ash/common/system/chromeos/cast/tray_cast.cc ('k') | ash/common/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/tray_network.cc
diff --git a/ash/common/system/chromeos/network/tray_network.cc b/ash/common/system/chromeos/network/tray_network.cc
index 44c38399c1ca88e251aad7cacd580603ee855172..14de552f6e36a09e99a815328030f63ecd223472 100644
--- a/ash/common/system/chromeos/network/tray_network.cc
+++ b/ash/common/system/chromeos/network/tray_network.cc
@@ -129,8 +129,8 @@ class NetworkTrayView : public TrayItemView,
class NetworkDefaultView : public TrayItemMore,
public network_icon::AnimationObserver {
public:
- NetworkDefaultView(TrayNetwork* network_tray, bool show_more)
- : TrayItemMore(network_tray, show_more) {
+ explicit NetworkDefaultView(TrayNetwork* network_tray)
+ : TrayItemMore(network_tray) {
Update();
}
@@ -161,8 +161,9 @@ class NetworkDefaultView : public TrayItemMore,
protected:
// TrayItemMore:
- std::unique_ptr<TrayPopupItemStyle> CreateStyle() const override {
- std::unique_ptr<TrayPopupItemStyle> style = TrayItemMore::CreateStyle();
+ std::unique_ptr<TrayPopupItemStyle> HandleCreateStyle() const override {
+ std::unique_ptr<TrayPopupItemStyle> style =
+ TrayItemMore::HandleCreateStyle();
style->set_color_style(GetConnectedNetwork() != nullptr
? TrayPopupItemStyle::ColorStyle::ACTIVE
: TrayPopupItemStyle::ColorStyle::INACTIVE);
@@ -268,7 +269,8 @@ views::View* TrayNetwork::CreateDefaultView(LoginStatus status) {
if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
CHECK(tray_ != NULL);
- default_ = new tray::NetworkDefaultView(this, status != LoginStatus::LOCKED);
+ default_ = new tray::NetworkDefaultView(this);
+ default_->SetEnabled(status != LoginStatus::LOCKED);
return default_;
}
« no previous file with comments | « ash/common/system/chromeos/cast/tray_cast.cc ('k') | ash/common/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698