#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/translate/translate_tab_helper.h"
#include "chrome/browser/ui/translate/translate_bubble_model.h"
#include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h"
// The standard implementation of TranslateBubbleModel.
class TranslateBubbleModelImpl : public TranslateBubbleModel {
public:
- TranslateBubbleModelImpl(TranslateBubbleModel::ViewState view_type,
+ TranslateBubbleModelImpl(TranslateTabHelper::TranslateStep step,
scoped_ptr<TranslateUIDelegate> ui_delegate);
virtual ~TranslateBubbleModelImpl();
+ // Converts a TranslateStep to a ViewState.
+ // This function never returns VIEW_STATE_ADVANCED.
+ static TranslateBubbleModel::ViewState TranslateStepToViewState(
+ TranslateTabHelper::TranslateStep step);
+
// TranslateBubbleModel methods.
virtual TranslateBubbleModel::ViewState GetViewState() const OVERRIDE;
virtual void SetViewState(TranslateBubbleModel::ViewState view_state)