#ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
#define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
#include "chrome/browser/ui/webui/signin/inline_login_handler.h"
class GaiaAuthFetcher;
class InlineLoginHandlerImpl : public InlineLoginHandler {
public:
InlineLoginHandlerImpl();
virtual ~InlineLoginHandlerImpl();
using InlineLoginHandler::web_ui;
base::WeakPtr<InlineLoginHandlerImpl> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
Browser* GetDesktopBrowser();
void SyncStarterCallback(OneClickSigninSyncStarter::SyncSetupResult result);
void CloseTab();
void HandleLoginError(const std::string& error_msg);
private:
virtual void RegisterMessages() OVERRIDE;
virtual void SetExtraInitParams(base::DictionaryValue& params) OVERRIDE;
virtual void CompleteLogin(const base::ListValue* args) OVERRIDE;
void HandleSwitchToFullTabMessage(const base::ListValue* args);
base::WeakPtrFactory<InlineLoginHandlerImpl> weak_factory_;
std::string email_;
std::string password_;
std::string session_index_;
bool choose_what_to_sync_;
bool complete_login_triggered_;
DISALLOW_COPY_AND_ASSIGN(InlineLoginHandlerImpl);
};
#endif