Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: chrome/browser/ui/views/profiles/force_signout_dialog_view.h

Issue 2862653002: If force-sign-in policy is enabled, popup warning dialog before window closing if auth token becom… (Closed)
Patch Set: cr Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698