assistant_view_delegate_impl.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_ASSISTANT_VIEW_DELEGATE_IMPL_H_
  5. #define ASH_ASSISTANT_ASSISTANT_VIEW_DELEGATE_IMPL_H_
  6. #include <string>
  7. #include "ash/assistant/ui/assistant_view_delegate.h"
  8. namespace ash {
  9. class AssistantControllerImpl;
  10. class AssistantViewDelegateImpl : public AssistantViewDelegate {
  11. public:
  12. explicit AssistantViewDelegateImpl(
  13. AssistantControllerImpl* assistant_controller);
  14. AssistantViewDelegateImpl(const AssistantViewDelegateImpl&) = delete;
  15. AssistantViewDelegateImpl& operator=(const AssistantViewDelegateImpl&) =
  16. delete;
  17. ~AssistantViewDelegateImpl() override;
  18. // AssistantViewDelegate:
  19. const AssistantNotificationModel* GetNotificationModel() const override;
  20. void AddObserver(AssistantViewDelegateObserver* observer) override;
  21. void RemoveObserver(AssistantViewDelegateObserver* observer) override;
  22. void DownloadImage(const GURL& url,
  23. ImageDownloader::DownloadCallback callback) override;
  24. ::wm::CursorManager* GetCursorManager() override;
  25. std::string GetPrimaryUserGivenName() const override;
  26. aura::Window* GetRootWindowForDisplayId(int64_t display_id) override;
  27. aura::Window* GetRootWindowForNewWindows() override;
  28. bool IsTabletMode() const override;
  29. void OnDialogPlateButtonPressed(AssistantButtonId id) override;
  30. void OnDialogPlateContentsCommitted(const std::string& text) override;
  31. void OnNotificationButtonPressed(const std::string& notification_id,
  32. int notification_button_index) override;
  33. void OnOnboardingShown() override;
  34. void OnOptInButtonPressed() override;
  35. void OnSuggestionPressed(
  36. const base::UnguessableToken& suggestion_id) override;
  37. bool ShouldShowOnboarding() const override;
  38. private:
  39. AssistantControllerImpl* const assistant_controller_;
  40. base::ObserverList<AssistantViewDelegateObserver> view_delegate_observers_;
  41. };
  42. } // namespace ash
  43. #endif // ASH_ASSISTANT_ASSISTANT_VIEW_DELEGATE_IMPL_H_