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

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

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 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/audio/volume_view.cc ('k') | ash/system/date/date_view.cc » ('j') | 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 f77e4ccf2f753cc269ff2db61f582750c9d31d11..849a35af275effdce040ae2fa183d57c45bf36ee 100644
--- a/ash/system/chromeos/network/network_state_list_detailed_view.cc
+++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc
@@ -495,7 +495,7 @@ void NetworkStateListDetailedView::CreateHeaderEntry() {
}
info_icon_ = new InfoIcon(this);
- info_icon_->SetFocusable(true);
+ info_icon_->SetFocusBehavior(FocusBehavior::ALWAYS);
info_icon_->SetTooltipText(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NETWORK_INFO));
info_throbber_container->AddChildView(info_icon_);
@@ -607,11 +607,11 @@ void NetworkStateListDetailedView::SetScanningStateForThrobberView(
// NOTE: As we do not want to lose focus from the network info throbber view,
// the order of below operation is important.
if (is_scanning) {
- scanning_throbber_->SetFocusable(true);
- info_icon_->SetFocusable(false);
+ scanning_throbber_->SetFocusBehavior(FocusBehavior::ALWAYS);
+ info_icon_->SetFocusBehavior(FocusBehavior::NEVER);
} else {
- info_icon_->SetFocusable(true);
- scanning_throbber_->SetFocusable(false);
+ info_icon_->SetFocusBehavior(FocusBehavior::ALWAYS);
+ scanning_throbber_->SetFocusBehavior(FocusBehavior::NEVER);
}
// If the Network Info view was in focus while this toggle operation was
// being performed then the focus should remain on this view.
« no previous file with comments | « ash/system/audio/volume_view.cc ('k') | ash/system/date/date_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698