#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_
#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "url/gurl.h"
class GoogleURLTracker;
class InfoBarService;
class GoogleURLTrackerInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
static InfoBar* Create(InfoBarService* infobar_service,
GoogleURLTracker* google_url_tracker,
const GURL& search_url);
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
const GURL& search_url() const { return search_url_; }
void set_search_url(const GURL& search_url) { search_url_ = search_url; }
int pending_id() const { return pending_id_; }
void set_pending_id(int pending_id) { pending_id_ = pending_id; }
virtual void Update(const GURL& search_url);
virtual void Close(bool redo_search);
protected:
GoogleURLTrackerInfoBarDelegate(GoogleURLTracker* google_url_tracker,
const GURL& search_url);
virtual ~GoogleURLTrackerInfoBarDelegate();
private:
virtual base::string16 GetMessageText() const OVERRIDE;
virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
virtual base::string16 GetLinkText() const OVERRIDE;
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
virtual bool ShouldExpireInternal(
const NavigationDetails& details) const OVERRIDE;
GoogleURLTracker* google_url_tracker_;
GURL search_url_;
int pending_id_;
DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerInfoBarDelegate);
};
#endif