| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // The user activated the translate page action icon. | 66 // The user activated the translate page action icon. |
| 67 PAGE_ACTION_ICON_ACTIVATED, | 67 PAGE_ACTION_ICON_ACTIVATED, |
| 68 | 68 |
| 69 // The user deactivated the translate page action icon. | 69 // The user deactivated the translate page action icon. |
| 70 PAGE_ACTION_ICON_DEACTIVATED, | 70 PAGE_ACTION_ICON_DEACTIVATED, |
| 71 | 71 |
| 72 // The translate bubble was shown to the user. | 72 // The translate bubble was shown to the user. |
| 73 BUBBLE_SHOWN, | 73 BUBBLE_SHOWN, |
| 74 | 74 |
| 75 // The translate bugbble could not be shown to the user, for various reasons. |
| 76 BUBBLE_NOT_SHOWN_WINDOW_NOT_VALID, |
| 77 BUBBLE_NOT_SHOWN_WINDOW_MINIMIZED, |
| 78 BUBBLE_NOT_SHOWN_WINDOW_NOT_ACTIVE, |
| 79 BUBBLE_NOT_SHOWN_WEB_CONTENTS_NOT_ACTIVE, |
| 80 BUBBLE_NOT_SHOWN_EDITABLE_FIELD_IS_ACTIVE, |
| 81 |
| 75 TRANSLATE_BUBBLE_UI_EVENT_MAX | 82 TRANSLATE_BUBBLE_UI_EVENT_MAX |
| 76 }; | 83 }; |
| 77 | 84 |
| 78 // Logs metrics for the user's TranslateBubbleUiEvent |action|. | 85 // Logs metrics for the user's TranslateBubbleUiEvent |action|. |
| 79 void ReportUiAction(translate::TranslateBubbleUiEvent action); | 86 void ReportUiAction(translate::TranslateBubbleUiEvent action); |
| 80 | 87 |
| 81 } // namespace translate | 88 } // namespace translate |
| 82 | 89 |
| 83 // The class which manages the transition of the view state of the Translate | 90 // The class which manages the transition of the view state of the Translate |
| 84 // bubble. | 91 // bubble. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 102 // The view type. When the current view type is not 'Advanced' view, this is | 109 // The view type. When the current view type is not 'Advanced' view, this is |
| 103 // equivalent to |view_state_|. Otherwise, this is the previous view type | 110 // equivalent to |view_state_|. Otherwise, this is the previous view type |
| 104 // before the user opens the 'Advanced' view. This is used to navigate when | 111 // before the user opens the 'Advanced' view. This is used to navigate when |
| 105 // pressing 'Cancel' button on the 'Advanced' view. | 112 // pressing 'Cancel' button on the 'Advanced' view. |
| 106 TranslateBubbleModel::ViewState view_state_before_advanced_view_; | 113 TranslateBubbleModel::ViewState view_state_before_advanced_view_; |
| 107 | 114 |
| 108 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewStateTransition); | 115 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleViewStateTransition); |
| 109 }; | 116 }; |
| 110 | 117 |
| 111 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ | 118 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_ |
| OLD | NEW |