Chromium Code Reviews| Index: chrome/browser/ui/views/profiles/force_signout_dialog_view.h |
| diff --git a/chrome/browser/ui/views/profiles/force_signout_dialog_view.h b/chrome/browser/ui/views/profiles/force_signout_dialog_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ac020d1ad961c35e6508a8bdea70f4328eef157f |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/profiles/force_signout_dialog_view.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2017 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 CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_VIEW_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_VIEW_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "ui/views/controls/button/button.h" |
| +#include "ui/views/window/dialog_delegate.h" |
| + |
| +class Browser; |
| +class ForceSignoutDialog; |
| + |
| +// The view of ForceSignoutDialog |
| +class ForceSignoutDialogView : public views::DialogDelegateView { |
|
sky
2017/05/17 18:03:18
Why do you need both ForceSignoutDialog and ForceS
zmin
2017/05/18 03:31:18
I created two classes at the beginning to avoid on
|
| + public: |
| + ForceSignoutDialogView(Browser* browser, |
| + std::unique_ptr<ForceSignoutDialog> dialog); |
| + |
| + // views::DialogDelegateView |
| + bool Accept() override; |
| + bool Cancel() override; |
| + base::string16 GetWindowTitle() const override; |
| + base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| + int GetDialogButtons() const override; |
| + ui::ModalType GetModalType() const override; |
| + |
| + // views::View |
| + void AddedToWidget() override; |
| + |
| + void ActivateModalDialog(); |
| + bool IsShowing() const; |
| + |
| + private: |
| + ~ForceSignoutDialogView() override; |
| + |
| + std::unique_ptr<ForceSignoutDialog> dialog_; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_PROFILES_FORCE_SIGNOUT_DIALOG_VIEW_H_ |