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

Side by Side Diff: ash/common/system/tray/tray_popup_utils.cc

Issue 2709103007: Update a11y of volume row in CrOS system menu. (Closed)
Patch Set: resolve conflict Created 3 years, 9 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 | « ash/common/system/tray/tray_item_more.cc ('k') | ash/resources/ash_resources.grd » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/common/system/tray/tray_popup_utils.h" 5 #include "ash/common/system/tray/tray_popup_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
11 #include "ash/common/ash_view_ids.h" 11 #include "ash/common/ash_view_ids.h"
12 #include "ash/common/session/session_state_delegate.h" 12 #include "ash/common/session/session_state_delegate.h"
13 #include "ash/common/system/tray/fixed_sized_image_view.h" 13 #include "ash/common/system/tray/fixed_sized_image_view.h"
14 #include "ash/common/system/tray/size_range_layout.h" 14 #include "ash/common/system/tray/size_range_layout.h"
15 #include "ash/common/system/tray/tray_constants.h" 15 #include "ash/common/system/tray/tray_constants.h"
16 #include "ash/common/system/tray/tray_popup_item_style.h" 16 #include "ash/common/system/tray/tray_popup_item_style.h"
17 #include "ash/common/wm_shell.h" 17 #include "ash/common/wm_shell.h"
18 #include "ash/resources/vector_icons/vector_icons.h"
18 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
19 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/gfx/paint_vector_icon.h"
20 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" 22 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
21 #include "ui/views/animation/ink_drop_highlight.h" 23 #include "ui/views/animation/ink_drop_highlight.h"
22 #include "ui/views/animation/ink_drop_impl.h" 24 #include "ui/views/animation/ink_drop_impl.h"
23 #include "ui/views/animation/ink_drop_mask.h" 25 #include "ui/views/animation/ink_drop_mask.h"
24 #include "ui/views/animation/square_ink_drop_ripple.h" 26 #include "ui/views/animation/square_ink_drop_ripple.h"
25 #include "ui/views/background.h" 27 #include "ui/views/background.h"
26 #include "ui/views/border.h" 28 #include "ui/views/border.h"
27 #include "ui/views/controls/button/button.h" 29 #include "ui/views/controls/button/button.h"
28 #include "ui/views/controls/button/label_button.h" 30 #include "ui/views/controls/button/label_button.h"
29 #include "ui/views/controls/button/md_text_button.h" 31 #include "ui/views/controls/button/md_text_button.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return new FixedSizedImageView( 220 return new FixedSizedImageView(
219 GetTrayConstant(TRAY_POPUP_ITEM_MAIN_IMAGE_CONTAINER_WIDTH), 221 GetTrayConstant(TRAY_POPUP_ITEM_MAIN_IMAGE_CONTAINER_WIDTH),
220 GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT)); 222 GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT));
221 } 223 }
222 224
223 views::ImageView* TrayPopupUtils::CreateMoreImageView() { 225 views::ImageView* TrayPopupUtils::CreateMoreImageView() {
224 views::ImageView* image = 226 views::ImageView* image =
225 new FixedSizedImageView(GetTrayConstant(TRAY_POPUP_ITEM_MORE_IMAGE_SIZE), 227 new FixedSizedImageView(GetTrayConstant(TRAY_POPUP_ITEM_MORE_IMAGE_SIZE),
226 GetTrayConstant(TRAY_POPUP_ITEM_MORE_IMAGE_SIZE)); 228 GetTrayConstant(TRAY_POPUP_ITEM_MORE_IMAGE_SIZE));
227 image->EnableCanvasFlippingForRTLUI(true); 229 image->EnableCanvasFlippingForRTLUI(true);
230 image->SetImage(
231 gfx::CreateVectorIcon(kSystemMenuArrowRightIcon, kMenuIconColor));
228 return image; 232 return image;
229 } 233 }
230 234
231 views::Slider* TrayPopupUtils::CreateSlider(views::SliderListener* listener) { 235 views::Slider* TrayPopupUtils::CreateSlider(views::SliderListener* listener) {
232 views::Slider* slider = new views::Slider(listener); 236 views::Slider* slider = new views::Slider(listener);
233 slider->SetBorder(views::CreateEmptyBorder(gfx::Insets(0, 16))); 237 slider->SetBorder(views::CreateEmptyBorder(gfx::Insets(0, 16)));
234 return slider; 238 return slider;
235 } 239 }
236 240
237 views::ToggleButton* TrayPopupUtils::CreateToggleButton( 241 views::ToggleButton* TrayPopupUtils::CreateToggleButton(
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) { 431 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) {
428 // TODO(tdanderson): Consider moving this into WmShell, or introduce a 432 // TODO(tdanderson): Consider moving this into WmShell, or introduce a
429 // CanShowSettings() method in each delegate type that has a 433 // CanShowSettings() method in each delegate type that has a
430 // ShowSettings() method. 434 // ShowSettings() method.
431 return status != LoginStatus::NOT_LOGGED_IN && 435 return status != LoginStatus::NOT_LOGGED_IN &&
432 status != LoginStatus::LOCKED && 436 status != LoginStatus::LOCKED &&
433 !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 437 !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
434 } 438 }
435 439
436 } // namespace ash 440 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_item_more.cc ('k') | ash/resources/ash_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698