unified_cast_detailed_view_controller.cc 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/system/cast/unified_cast_detailed_view_controller.h"
  5. #include "ash/shell.h"
  6. #include "ash/strings/grit/ash_strings.h"
  7. #include "ash/system/cast/tray_cast.h"
  8. #include "ash/system/tray/detailed_view_delegate.h"
  9. #include "ui/base/l10n/l10n_util.h"
  10. namespace ash {
  11. UnifiedCastDetailedViewController::UnifiedCastDetailedViewController(
  12. UnifiedSystemTrayController* tray_controller)
  13. : detailed_view_delegate_(
  14. std::make_unique<DetailedViewDelegate>(tray_controller)) {}
  15. UnifiedCastDetailedViewController::~UnifiedCastDetailedViewController() =
  16. default;
  17. views::View* UnifiedCastDetailedViewController::CreateView() {
  18. DCHECK(!view_);
  19. view_ = new CastDetailedView(detailed_view_delegate_.get());
  20. return view_;
  21. }
  22. std::u16string UnifiedCastDetailedViewController::GetAccessibleName() const {
  23. return l10n_util::GetStringUTF16(
  24. IDS_ASH_QUICK_SETTINGS_BUBBLE_CAST_SETTINGS_ACCESSIBLE_DESCRIPTION);
  25. }
  26. } // namespace ash