detailed_view_controller.h 963 B

1234567891011121314151617181920212223242526272829303132
  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. #ifndef ASH_SYSTEM_UNIFIED_DETAILED_VIEW_CONTROLLER_H_
  5. #define ASH_SYSTEM_UNIFIED_DETAILED_VIEW_CONTROLLER_H_
  6. #include <string>
  7. namespace views {
  8. class View;
  9. } // namespace views
  10. namespace ash {
  11. // Base class for controllers of detailed views.
  12. // To add a new detailed view, implement this class, and instantiate in
  13. // UnifiedSystemTrayController::Show*DetailedView() method.
  14. class DetailedViewController {
  15. public:
  16. virtual ~DetailedViewController() = default;
  17. // Create the detailed view. The view will be owned by views hierarchy. The
  18. // view will be always deleted after the controller is destructed.
  19. virtual views::View* CreateView() = 0;
  20. virtual std::u16string GetAccessibleName() const = 0;
  21. };
  22. } // namespace ash
  23. #endif // ASH_SYSTEM_UNIFIED_DETAILED_VIEW_CONTROLLER_H_