Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ | 5 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ |
| 6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ | 6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/translate/translate_bubble_model.h" | 9 #include "chrome/browser/ui/translate/translate_bubble_model.h" |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 | 55 |
| 56 // The user clicked the "Settings" link. | 56 // The user clicked the "Settings" link. |
| 57 SETTINGS_LINK_CLICKED, | 57 SETTINGS_LINK_CLICKED, |
| 58 | 58 |
| 59 // The user changed the "Source language". | 59 // The user changed the "Source language". |
| 60 SOURCE_LANGUAGE_MENU_CLICKED, | 60 SOURCE_LANGUAGE_MENU_CLICKED, |
| 61 | 61 |
| 62 // The user changed the "Target language". | 62 // The user changed the "Target language". |
| 63 TARGET_LANGUAGE_MENU_CLICKED, | 63 TARGET_LANGUAGE_MENU_CLICKED, |
| 64 | 64 |
| 65 // The user activate the translate page action icon. | |
|
msw
2016/05/12 17:29:41
nit: activated
ftang
2016/05/12 18:38:08
Done.
| |
| 66 PAGE_ACTION_ICON_ACTIVATED, | |
| 67 | |
| 68 // The user deactivate the translate page action icon. | |
|
msw
2016/05/12 17:29:41
nit: deactivated
ftang
2016/05/12 18:38:08
Done.
| |
| 69 PAGE_ACTION_ICON_DEACTIVATED, | |
| 70 | |
| 65 TRANSLATE_BUBBLE_UI_EVENT_MAX | 71 TRANSLATE_BUBBLE_UI_EVENT_MAX |
| 66 }; | 72 }; |
| 67 | 73 |
| 74 extern const char kTranslateBubbleUIEvent[]; | |
| 75 | |
| 68 } // namespace translate | 76 } // namespace translate |
| 69 | 77 |
| 70 // The class which manages the transition of the view state of the Translate | 78 // The class which manages the transition of the view state of the Translate |
| 71 // bubble. | 79 // bubble. |
| 72 class TranslateBubbleViewStateTransition { | 80 class TranslateBubbleViewStateTransition { |
| 73 public: | 81 public: |
| 74 explicit TranslateBubbleViewStateTransition( | 82 explicit TranslateBubbleViewStateTransition( |
| 75 TranslateBubbleModel::ViewState view_state); | 83 TranslateBubbleModel::ViewState view_state); |
| 76 | 84 |
| 77 TranslateBubbleModel::ViewState view_state() const { return view_state_; } | 85 TranslateBubbleModel::ViewState view_state() const { return view_state_; } |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 89 // The view type. When the current view type is not 'Advanced' view, this is | 97 // The view type. When the current view type is not 'Advanced' view, this is |
| 90 // equivalent to |view_state_|. Otherwise, this is the previous view type | 98 // equivalent to |view_state_|. Otherwise, this is the previous view type |
| 91 // before the user opens the 'Advanced' view. This is used to navigate when | 99 // before the user opens the 'Advanced' view. This is used to navigate when |
| 92 // pressing 'Cancel' button on the 'Advanced' view. | 100 // pressing 'Cancel' button on the 'Advanced' view. |
| 93 TranslateBubbleModel::ViewState view_state_before_advanced_view_; | 101 TranslateBubbleModel::ViewState view_state_before_advanced_view_; |
| 94 | 102 |
| 95 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewStateTransition); | 103 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewStateTransition); |
| 96 }; | 104 }; |
| 97 | 105 |
| 98 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ | 106 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ |
| OLD | NEW |