phone_disconnected_view.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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_PHONE_DISCONNECTED_VIEW_H_
  5. #define ASH_SYSTEM_PHONEHUB_PHONE_DISCONNECTED_VIEW_H_
  6. #include "ash/ash_export.h"
  7. #include "ash/system/phonehub/phone_hub_content_view.h"
  8. namespace ash {
  9. class PhoneHubInterstitialView;
  10. namespace phone_hub_metrics {
  11. enum class InterstitialScreenEvent;
  12. }
  13. namespace phonehub {
  14. class ConnectionScheduler;
  15. }
  16. // An interstitial view represeting that connection to the phone has been
  17. // interrupted.
  18. class ASH_EXPORT PhoneDisconnectedView : public PhoneHubContentView {
  19. public:
  20. METADATA_HEADER(PhoneDisconnectedView);
  21. explicit PhoneDisconnectedView(
  22. phonehub::ConnectionScheduler* connection_scheduler);
  23. PhoneDisconnectedView(const PhoneDisconnectedView&) = delete;
  24. PhoneDisconnectedView& operator=(const PhoneDisconnectedView&) = delete;
  25. ~PhoneDisconnectedView() override;
  26. // PhoneHubContentView:
  27. phone_hub_metrics::Screen GetScreenForMetrics() const override;
  28. private:
  29. void ButtonPressed(phone_hub_metrics::InterstitialScreenEvent event,
  30. base::RepeatingClosure callback);
  31. phonehub::ConnectionScheduler* connection_scheduler_ = nullptr;
  32. PhoneHubInterstitialView* content_view_ = nullptr;
  33. };
  34. } // namespace ash
  35. #endif // ASH_SYSTEM_PHONEHUB_PHONE_DISCONNECTED_VIEW_H_