| // Copyright 2022 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef ASH_LOGIN_UI_LOGIN_CAMERA_TIMEOUT_VIEW_H_ |
| #define ASH_LOGIN_UI_LOGIN_CAMERA_TIMEOUT_VIEW_H_ |
| |
| #include "ash/ash_export.h" |
| #include "ash/login/ui/non_accessible_view.h" |
| #include "base/memory/raw_ptr.h" |
| #include "ui/views/controls/button/button.h" |
| #include "ui/views/controls/label.h" |
| #include "ui/views/view.h" |
| |
| namespace ash { |
| |
| class ArrowButtonView; |
| |
| // UI that is shown on camera usage timeout after the third-party SAML dialog |
| // has been dismissed. It consists of a text message and an arrow button, which |
| // leads user back to sign-in page. For more info check discussion under privacy |
| // review in FLB crbug.com/1221337. |
| class ASH_EXPORT LoginCameraTimeoutView : public NonAccessibleView { |
| public: |
| // TestApi is used for tests to get internal implementation details. |
| class ASH_EXPORT TestApi { |
| public: |
| explicit TestApi(LoginCameraTimeoutView* view); |
| ~TestApi(); |
| |
| views::View* arrow_button() const; |
| |
| private: |
| LoginCameraTimeoutView* const view_; |
| }; |
| |
| using OnPublicAccountTapped = base::RepeatingClosure; |
| |
| LoginCameraTimeoutView(const views::Button::PressedCallback& callback); |
| |
| LoginCameraTimeoutView(const LoginCameraTimeoutView&) = delete; |
| LoginCameraTimeoutView& operator=(const LoginCameraTimeoutView&) = delete; |
| |
| ~LoginCameraTimeoutView() override; |
| |
| // views::View: |
| void RequestFocus() override; |
| |
| private: |
| base::raw_ptr<views::Label> title_; |
| base::raw_ptr<views::Label> subtitle_; |
| base::raw_ptr<ArrowButtonView> arrow_button_; |
| }; |
| |
| } // namespace ash |
| |
| #endif // ASH_LOGIN_UI_LOGIN_CAMERA_TIMEOUT_VIEW_H_ |