#ifndef CHROME_BROWSER_ASH_HATS_HATS_DIALOG_H_
#define CHROME_BROWSER_ASH_HATS_HATS_DIALOG_H_
#include <string>
#include "base/gtest_prod_util.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
namespace ash {
class HatsDialog : public ui::WebDialogDelegate {
public:
HatsDialog(const HatsDialog&) = delete;
HatsDialog& operator=(const HatsDialog&) = delete;
~HatsDialog() override;
static void Show(const std::string& trigger_id,
const std::string& histogram_name,
const std::string& site_context);
static bool HandleClientTriggeredAction(const std::string& action,
const std::string& histogram_name);
private:
FRIEND_TEST_ALL_PREFIXES(HatsDialogTest, ParseAnswer);
HatsDialog(const std::string& trigger_id,
const std::string& histogram_name,
const std::string& site_context);
static bool ParseAnswer(const std::string& input,
int* question,
std::vector<int>* scores);
void OnLoadingStateChanged(content::WebContents* source) override;
const std::string trigger_id_;
const std::string histogram_name_;
std::string action_;
};
}
#endif