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

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

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 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 unified diff | Download patch
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/system/tray/tray_popup_utils.h" 5 #include "ash/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/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 views::Separator* TrayPopupUtils::CreateListSubHeaderSeparator() { 422 views::Separator* TrayPopupUtils::CreateListSubHeaderSeparator() {
423 views::Separator* separator = new views::Separator(); 423 views::Separator* separator = new views::Separator();
424 separator->SetColor(kMenuSeparatorColor); 424 separator->SetColor(kMenuSeparatorColor);
425 separator->SetBorder(views::CreateEmptyBorder( 425 separator->SetBorder(views::CreateEmptyBorder(
426 kMenuSeparatorVerticalPadding - views::Separator::kThickness, 0, 0, 0)); 426 kMenuSeparatorVerticalPadding - views::Separator::kThickness, 0, 0, 0));
427 return separator; 427 return separator;
428 } 428 }
429 429
430 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) { 430 bool TrayPopupUtils::CanOpenWebUISettings(LoginStatus status) {
431 // TODO(tdanderson): Consider moving this into WmShell, or introduce a 431 // TODO(tdanderson): Consider moving this into ShellPort, or introduce a
432 // CanShowSettings() method in each delegate type that has a 432 // CanShowSettings() method in each delegate type that has a
433 // ShowSettings() method. 433 // ShowSettings() method.
434 return status != LoginStatus::NOT_LOGGED_IN && 434 return status != LoginStatus::NOT_LOGGED_IN &&
435 status != LoginStatus::LOCKED && 435 status != LoginStatus::LOCKED &&
436 !Shell::Get()->session_controller()->IsInSecondaryLoginScreen(); 436 !Shell::Get()->session_controller()->IsInSecondaryLoginScreen();
437 } 437 }
438 438
439 void TrayPopupUtils::InitializeAsCheckableRow(HoverHighlightView* container, 439 void TrayPopupUtils::InitializeAsCheckableRow(HoverHighlightView* container,
440 bool checked) { 440 bool checked) {
441 gfx::ImageSkia check_mark = 441 gfx::ImageSkia check_mark =
442 CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700); 442 CreateVectorIcon(kCheckCircleIcon, gfx::kGoogleGreen700);
443 container->AddRightIcon(check_mark, check_mark.width()); 443 container->AddRightIcon(check_mark, check_mark.width());
444 UpdateCheckMarkVisibility(container, checked); 444 UpdateCheckMarkVisibility(container, checked);
445 } 445 }
446 446
447 void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container, 447 void TrayPopupUtils::UpdateCheckMarkVisibility(HoverHighlightView* container,
448 bool visible) { 448 bool visible) {
449 container->SetRightViewVisible(visible); 449 container->SetRightViewVisible(visible);
450 container->SetAccessiblityState( 450 container->SetAccessiblityState(
451 visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX 451 visible ? HoverHighlightView::AccessibilityState::CHECKED_CHECKBOX
452 : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX); 452 : HoverHighlightView::AccessibilityState::UNCHECKED_CHECKBOX);
453 } 453 }
454 454
455 } // namespace ash 455 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698