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

Side by Side Diff: ash/system/audio/volume_view.cc

Issue 2707263011: Test aria-pressed=mixed on windows (Closed)
Patch Set: git cl try Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/ime_menu/ime_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/audio/volume_view.h" 5 #include "ash/system/audio/volume_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/metrics/user_metrics_action.h" 9 #include "ash/metrics/user_metrics_action.h"
10 #include "ash/resources/vector_icons/vector_icons.h" 10 #include "ash/resources/vector_icons/vector_icons.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 image_index_ = image_index; 94 image_index_ = image_index;
95 } 95 }
96 96
97 private: 97 private:
98 // views::View: 98 // views::View:
99 void GetAccessibleNodeData(ui::AXNodeData* node_data) override { 99 void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
100 node_data->SetName( 100 node_data->SetName(
101 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VOLUME_MUTE)); 101 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VOLUME_MUTE));
102 node_data->role = ui::AX_ROLE_TOGGLE_BUTTON; 102 node_data->role = ui::AX_ROLE_TOGGLE_BUTTON;
103 if (CrasAudioHandler::Get()->IsOutputMuted()) 103 if (CrasAudioHandler::Get()->IsOutputMuted())
104 node_data->AddState(ui::AX_STATE_PRESSED); 104 node_data->AddIntAttribute(ui::AX_ATTR_PRESSED_STATE,
105 ui::AX_BUTTON_STATE_TRUE);
105 } 106 }
106 107
107 views::ImageView* image_; 108 views::ImageView* image_;
108 int image_index_; 109 int image_index_;
109 110
110 DISALLOW_COPY_AND_ASSIGN(VolumeButton); 111 DISALLOW_COPY_AND_ASSIGN(VolumeButton);
111 }; 112 };
112 113
113 VolumeView::VolumeView(SystemTrayItem* owner, 114 VolumeView::VolumeView(SystemTrayItem* owner,
114 bool is_default_view) 115 bool is_default_view)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 if (new_volume > current_volume) 275 if (new_volume > current_volume)
275 HandleVolumeUp(new_volume); 276 HandleVolumeUp(new_volume);
276 else 277 else
277 HandleVolumeDown(new_volume); 278 HandleVolumeDown(new_volume);
278 } 279 }
279 icon_->Update(); 280 icon_->Update();
280 } 281 }
281 282
282 } // namespace tray 283 } // namespace tray
283 } // namespace ash 284 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/ime_menu/ime_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698