quick_action_controller_base.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2020 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_PHONEHUB_QUICK_ACTION_CONTROLLER_BASE_H_
  5. #define ASH_SYSTEM_PHONEHUB_QUICK_ACTION_CONTROLLER_BASE_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/phonehub/quick_action_item.h"
  8. namespace ash {
  9. class QuickActionItem;
  10. // Base class for controllers of quick action item.
  11. // To add a new quick action item, implement this class, and add to the list in
  12. // QuickActionsView::InitQuickActionItems().
  13. class ASH_EXPORT QuickActionControllerBase : public QuickActionItem::Delegate {
  14. public:
  15. virtual ~QuickActionControllerBase() = default;
  16. // Create the view. Subclasses instantiate QuickActionItem.
  17. // The view will be owned by views hierarchy. The view will be always deleted
  18. // after the controller is destructed.
  19. virtual QuickActionItem* CreateItem() = 0;
  20. };
  21. } // namespace ash
  22. #endif // ASH_SYSTEM_PHONEHUB_QUICK_ACTION_CONTROLLER_BASE_H_