Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: chrome/browser/ui/translate/translate_bubble_view_state_transition.h

Issue 1962393003: log the click activate/deactive of translate icon on location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/translate/translate_bubble_view_state_transition.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 activated the translate page action icon.
66 PAGE_ACTION_ICON_ACTIVATED,
67
68 // The user deactivated the translate page action icon.
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/translate/translate_bubble_view_state_transition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698