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

Unified Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth.cc

Issue 2509943002: NO LONGER FOR REVIEW - [ash-md] Implements a square focus rectangle for ToggleButton (Closed)
Patch Set: [ash-md] Implements a square focus rectangle for ToggleButton (toggles that work) Created 4 years, 1 month 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/BUILD.gn ('k') | ash/common/system/chromeos/ime_menu/ime_list_view.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 31e11922cc238dee17a3480a24f2c810818c8e82..d60ef35ee6864b6ad02a32710090c1cabbeea13a 100644
--- a/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
+++ b/ash/common/system/chromeos/bluetooth/tray_bluetooth.cc
@@ -8,6 +8,7 @@
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/tray/fixed_sized_scroll_view.h"
#include "ash/common/system/tray/hover_highlight_view.h"
+#include "ash/common/system/tray/system_menu_toggle_button.h"
#include "ash/common/system/tray/system_tray.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/system_tray_notifier.h"
@@ -30,7 +31,6 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons_public.h"
-#include "ui/views/controls/button/toggle_button.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/progress_bar.h"
@@ -541,11 +541,7 @@ class BluetoothDetailedView : public TrayDetailsView {
// TODO(tdanderson): Move common toggle-creation logic to TrayPopupUtils.
// See crbug.com/614453.
- toggle_ = new views::ToggleButton(this);
- toggle_->SetFocusForPlatform();
- toggle_->SetAccessibleName(
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
- IDS_ASH_STATUS_TRAY_BLUETOOTH));
+ toggle_ = new SystemMenuToggleButton(this, IDS_ASH_STATUS_TRAY_BLUETOOTH);
tri_view()->AddView(TriView::Container::END, toggle_);
settings_ = CreateSettingsButton(login_);
@@ -675,7 +671,7 @@ class BluetoothDetailedView : public TrayDetailsView {
BluetoothDeviceList discovered_not_paired_devices_;
// The on/off toggle button used in material design.
- views::ToggleButton* toggle_;
+ SystemMenuToggleButton* toggle_;
// Only used in material design.
views::Button* settings_;
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/system/chromeos/ime_menu/ime_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698