Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / ui / translate / translate_bubble_view_state_transition.h
blobad6c76838c650f58e0ab79125aa2759b0682fd7b
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_
6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_
8 #include "base/basictypes.h"
9 #include "chrome/browser/ui/translate/translate_bubble_model.h"
11 // The class which manages the transition of the view state of the Translate
12 // bubble.
13 class TranslateBubbleViewStateTransition {
14 public:
15 explicit TranslateBubbleViewStateTransition(
16 TranslateBubbleModel::ViewState view_state);
18 TranslateBubbleModel::ViewState view_state() const { return view_state_; }
20 // Transitions the view state.
21 void SetViewState(TranslateBubbleModel::ViewState view_state);
23 // Goes back from the 'Advanced' view state.
24 void GoBackFromAdvanced();
26 private:
27 // The current view type.
28 TranslateBubbleModel::ViewState view_state_;
30 // The view type. When the current view type is not 'Advanced' view, this is
31 // equivalent to |view_state_|. Otherwise, this is the previous view type
32 // before the user opens the 'Advanced' view. This is used to navigate when
33 // pressing 'Cancel' button on the 'Advanced' view.
34 TranslateBubbleModel::ViewState view_state_before_advanced_view_;
36 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewStateTransition);
39 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_