notification_menu_view_test_api.cc 1.2 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 "notification_menu_view_test_api.h"
  5. #include "ash/app_menu/notification_item_view.h"
  6. #include "ash/app_menu/notification_menu_header_view.h"
  7. #include "ash/app_menu/notification_menu_view.h"
  8. #include "ash/app_menu/notification_overflow_view.h"
  9. #include "ash/public/cpp/app_menu_constants.h"
  10. #include "ui/views/controls/label.h"
  11. namespace ash {
  12. NotificationMenuViewTestAPI::NotificationMenuViewTestAPI(
  13. NotificationMenuView* notification_menu_view)
  14. : notification_menu_view_(notification_menu_view) {}
  15. NotificationMenuViewTestAPI::~NotificationMenuViewTestAPI() = default;
  16. std::u16string NotificationMenuViewTestAPI::GetCounterViewContents() const {
  17. return notification_menu_view_->header_view_->counter_->GetText();
  18. }
  19. int NotificationMenuViewTestAPI::GetItemViewCount() const {
  20. return notification_menu_view_->notification_item_views_.size();
  21. }
  22. NotificationOverflowView* NotificationMenuViewTestAPI::GetOverflowView() const {
  23. return notification_menu_view_->overflow_view_;
  24. }
  25. } // namespace ash