| Index: chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h
|
| diff --git a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e140050eb4fa46a81aebea239df47b3180233066
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h
|
| @@ -0,0 +1,61 @@
|
| +// Copyright (c) 2013 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_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_
|
| +#define CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/callback.h"
|
| +#include "base/string16.h"
|
| +#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
|
| +#include "ui/base/ui_base_types.h"
|
| +#include "ui/web_dialogs/web_dialog_delegate.h"
|
| +
|
| +class Profile;
|
| +class ProfileSigninConfirmationHandler;
|
| +class WebUIMessageHandler;
|
| +
|
| +// Deletes itself when the dialog is closed.
|
| +class ProfileSigninConfirmationDialog : public ui::WebDialogDelegate {
|
| + public:
|
| + static void ShowDialog(Profile* profile,
|
| + const std::string& username,
|
| + const base::Closure& cancel_signin,
|
| + const base::Closure& signin_with_new_profile,
|
| + const base::Closure& continue_signin);
|
| + void Close();
|
| +
|
| + private:
|
| + ProfileSigninConfirmationDialog(
|
| + Profile* profile,
|
| + const std::string& username,
|
| + const base::Closure& cancel_signin,
|
| + const base::Closure& signin_with_new_profile,
|
| + const base::Closure& continue_signin);
|
| + virtual ~ProfileSigninConfirmationDialog();
|
| +
|
| + // Overridden from WebDialogDelegate:
|
| + virtual ui::ModalType GetDialogModalType() const OVERRIDE;
|
| + virtual string16 GetDialogTitle() const OVERRIDE;
|
| + virtual GURL GetDialogContentURL() const OVERRIDE;
|
| + virtual void GetWebUIMessageHandlers(
|
| + std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
|
| + virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
|
| + virtual std::string GetDialogArgs() const OVERRIDE;
|
| + virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
|
| + virtual void OnCloseContents(content::WebContents* source,
|
| + bool* out_close_dialog) OVERRIDE;
|
| + virtual bool ShouldShowDialogTitle() const OVERRIDE;
|
| +
|
| + // Deletes itself.
|
| + ConstrainedWebDialogDelegate* delegate_;
|
| +
|
| + std::string username_;
|
| + mutable scoped_ptr<ProfileSigninConfirmationHandler> handler_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationDialog);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_SIGNIN_CONFIRMATION_DIALOG_H_
|
|
|