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

Side by Side Diff: chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h

Issue 12221111: Add a modal confirmation dialog to the enterprise profile sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move WebUI handler into WebDialogDelegate implementation Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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
5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/string16.h"
12 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
13 #include "ui/base/ui_base_types.h"
14 #include "ui/web_dialogs/web_dialog_delegate.h"
15
16 class Profile;
17 class ProfileSigninConfirmationHandler;
18 class WebUIMessageHandler;
19
20 // Deletes itself when the dialog is closed.
21 class ProfileSigninConfirmationDialog : public ui::WebDialogDelegate {
22 public:
23 static void ShowDialog(Profile* profile,
24 const std::string& username,
25 const base::Closure& cancel_signin,
26 const base::Closure& signin_with_new_profile,
27 const base::Closure& continue_signin);
28 void Close();
29
30 private:
31 ProfileSigninConfirmationDialog(
32 Profile* profile,
33 const std::string& username,
34 const base::Closure& cancel_signin,
35 const base::Closure& signin_with_new_profile,
36 const base::Closure& continue_signin);
37 virtual ~ProfileSigninConfirmationDialog();
38
39 // Overridden from WebDialogDelegate:
40 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
41 virtual string16 GetDialogTitle() const OVERRIDE;
42 virtual GURL GetDialogContentURL() const OVERRIDE;
43 virtual void GetWebUIMessageHandlers(
44 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
45 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
46 virtual std::string GetDialogArgs() const OVERRIDE;
47 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
48 virtual void OnCloseContents(content::WebContents* source,
49 bool* out_close_dialog) OVERRIDE;
50 virtual bool ShouldShowDialogTitle() const OVERRIDE;
51
52 // Deletes itself.
53 ConstrainedWebDialogDelegate* delegate_;
54
55 std::string username_;
56 mutable scoped_ptr<ProfileSigninConfirmationHandler> handler_;
57
58 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialog);
59 };
60
61 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698