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

Unified Diff: ash/system/chromeos/network/network_state_list_detailed_view.cc

Issue 14276002: Remove mobile account buttons from status area (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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/system/chromeos/network/network_state_list_detailed_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/network_state_list_detailed_view.cc
diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.cc b/ash/system/chromeos/network/network_state_list_detailed_view.cc
index 661cb47b4646374246d07eba1983587f2282f63f..6af2c09e5c9b6a9ff8a51f6ad20a0b2d8ff714f5 100644
--- a/ash/system/chromeos/network/network_state_list_detailed_view.cc
+++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc
@@ -141,8 +141,6 @@ NetworkStateListDetailedView::NetworkStateListDetailedView(
info_icon_(NULL),
button_wifi_(NULL),
button_mobile_(NULL),
- view_mobile_account_(NULL),
- setup_mobile_account_(NULL),
other_wifi_(NULL),
turn_on_wifi_(NULL),
other_mobile_(NULL),
@@ -165,7 +163,6 @@ NetworkStateListDetailedView::~NetworkStateListDetailedView() {
void NetworkStateListDetailedView::ManagerChanged() {
UpdateNetworkList();
UpdateHeaderButtons();
- UpdateMobileAccount();
UpdateNetworkExtra();
Layout();
}
@@ -176,7 +173,6 @@ void NetworkStateListDetailedView::NetworkListChanged() {
UpdateNetworks(network_list);
UpdateNetworkList();
UpdateHeaderButtons();
- UpdateMobileAccount();
UpdateNetworkExtra();
Layout();
}
@@ -199,13 +195,12 @@ void NetworkStateListDetailedView::Init() {
CreateNetworkExtra();
CreateHeaderEntry();
CreateHeaderButtons();
- CreateMobileAccount();
+
NetworkStateList network_list;
NetworkStateHandler::Get()->GetNetworkList(&network_list);
UpdateNetworks(network_list);
UpdateNetworkList();
UpdateHeaderButtons();
- UpdateMobileAccount();
UpdateNetworkExtra();
CallRequestScan();
}
@@ -269,18 +264,10 @@ void NetworkStateListDetailedView::OnViewClicked(views::View* sender) {
if (login_ == user::LOGGED_IN_LOCKED)
return;
- ash::SystemTrayDelegate* delegate =
- ash::Shell::GetInstance()->system_tray_delegate();
- if (sender == view_mobile_account_) {
- delegate->ShowCellularURL(topup_url_);
- } else if (sender == setup_mobile_account_) {
- delegate->ShowCellularURL(setup_url_);
- } else {
- std::map<views::View*, std::string>::iterator found =
- network_map_.find(sender);
- if (found != network_map_.end())
- ConnectToNetwork(found->second);
- }
+ std::map<views::View*, std::string>::iterator found =
+ network_map_.find(sender);
+ if (found != network_map_.end())
+ ConnectToNetwork(found->second);
}
// Create UI components.
@@ -330,26 +317,6 @@ void NetworkStateListDetailedView::CreateHeaderButtons() {
footer()->AddButton(info_icon_);
}
-void NetworkStateListDetailedView::CreateMobileAccount() {
- if (list_type_ != LIST_TYPE_NETWORK)
- return;
-
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabel(
- ui::ResourceBundle::GetSharedInstance().
- GetLocalizedString(IDS_ASH_STATUS_TRAY_MOBILE_VIEW_ACCOUNT),
- gfx::Font::NORMAL);
- AddChildView(container);
- view_mobile_account_ = container;
-
- container = new HoverHighlightView(this);
- container->AddLabel(ui::ResourceBundle::GetSharedInstance().
- GetLocalizedString(IDS_ASH_STATUS_TRAY_SETUP_MOBILE),
- gfx::Font::NORMAL);
- AddChildView(container);
- setup_mobile_account_ = container;
-}
-
void NetworkStateListDetailedView::CreateNetworkExtra() {
if (login_ == user::LOGGED_IN_LOCKED)
return;
@@ -646,36 +613,6 @@ bool NetworkStateListDetailedView::UpdateNetworkListEntries(
return needs_relayout;
}
-void NetworkStateListDetailedView::UpdateMobileAccount() {
- if (list_type_ != LIST_TYPE_NETWORK)
- return;
-
- view_mobile_account_->SetVisible(false);
- setup_mobile_account_->SetVisible(false);
-
- if (login_ == user::LOGGED_IN_NONE)
- return;
-
- // TODO(stevenjb): Migrate this code to src/chromeos.
- std::string carrier_id, topup_url, setup_url;
- if (Shell::GetInstance()->system_tray_delegate()->
- GetCellularCarrierInfo(&carrier_id, &topup_url, &setup_url)) {
- if (carrier_id != carrier_id_) {
- carrier_id_ = carrier_id;
- if (!topup_url.empty())
- topup_url_ = topup_url;
- }
-
- if (!setup_url.empty())
- setup_url_ = setup_url;
-
- if (!topup_url_.empty())
- view_mobile_account_->SetVisible(true);
- if (!setup_url_.empty())
- setup_mobile_account_->SetVisible(true);
- }
-}
-
void NetworkStateListDetailedView::UpdateNetworkExtra() {
if (login_ == user::LOGGED_IN_LOCKED)
return;
« no previous file with comments | « ash/system/chromeos/network/network_state_list_detailed_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698