assistant_suggestions_model_observer.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_OBSERVER_H_
  5. #define ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_OBSERVER_H_
  6. #include <vector>
  7. #include "base/component_export.h"
  8. #include "base/observer_list_types.h"
  9. #include "chromeos/services/libassistant/public/cpp/assistant_suggestion.h"
  10. namespace ash {
  11. // A checked observer which receives notification of changes to the Assistant
  12. // suggestions model.
  13. class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantSuggestionsModelObserver
  14. : public base::CheckedObserver {
  15. public:
  16. using AssistantSuggestion = chromeos::assistant::AssistantSuggestion;
  17. // Invoked when the cache of conversation starters has changed.
  18. virtual void OnConversationStartersChanged(
  19. const std::vector<AssistantSuggestion>& conversation_starters) {}
  20. // Invoked when the cache of onboarding suggestions has changed.
  21. virtual void OnOnboardingSuggestionsChanged(
  22. const std::vector<AssistantSuggestion>& onboarding_suggestions) {}
  23. protected:
  24. ~AssistantSuggestionsModelObserver() override = default;
  25. };
  26. } // namespace ash
  27. #endif // ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_OBSERVER_H_