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_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, DoneButton); | 130 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, DoneButton); |
131 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, | 131 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, |
132 DoneButtonWithoutTranslating); | 132 DoneButtonWithoutTranslating); |
133 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, | 133 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, |
134 CancelButtonReturningBeforeTranslate); | 134 CancelButtonReturningBeforeTranslate); |
135 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, | 135 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, |
136 CancelButtonReturningAfterTranslate); | 136 CancelButtonReturningAfterTranslate); |
137 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, CancelButtonReturningError); | 137 FRIEND_TEST_ALL_PREFIXES(TranslateBubbleViewTest, CancelButtonReturningError); |
138 | 138 |
139 TranslateBubbleView(views::View* anchor_view, | 139 TranslateBubbleView(views::View* anchor_view, |
140 scoped_ptr<TranslateBubbleModel> model, | 140 std::unique_ptr<TranslateBubbleModel> model, |
141 translate::TranslateErrors::Type error_type, | 141 translate::TranslateErrors::Type error_type, |
142 content::WebContents* web_contents); | 142 content::WebContents* web_contents); |
143 | 143 |
144 // Returns the current child view. | 144 // Returns the current child view. |
145 views::View* GetCurrentView() const; | 145 views::View* GetCurrentView() const; |
146 | 146 |
147 // Handles the event when the user presses a button. | 147 // Handles the event when the user presses a button. |
148 void HandleButtonPressed(ButtonID sender_id); | 148 void HandleButtonPressed(ButtonID sender_id); |
149 | 149 |
150 // Handles the event when the user clicks a link. | 150 // Handles the event when the user clicks a link. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 void UpdateAdvancedView(); | 184 void UpdateAdvancedView(); |
185 | 185 |
186 static TranslateBubbleView* translate_bubble_view_; | 186 static TranslateBubbleView* translate_bubble_view_; |
187 | 187 |
188 views::View* before_translate_view_; | 188 views::View* before_translate_view_; |
189 views::View* translating_view_; | 189 views::View* translating_view_; |
190 views::View* after_translate_view_; | 190 views::View* after_translate_view_; |
191 views::View* error_view_; | 191 views::View* error_view_; |
192 views::View* advanced_view_; | 192 views::View* advanced_view_; |
193 | 193 |
194 scoped_ptr<ui::SimpleComboboxModel> denial_combobox_model_; | 194 std::unique_ptr<ui::SimpleComboboxModel> denial_combobox_model_; |
195 scoped_ptr<LanguageComboboxModel> source_language_combobox_model_; | 195 std::unique_ptr<LanguageComboboxModel> source_language_combobox_model_; |
196 scoped_ptr<LanguageComboboxModel> target_language_combobox_model_; | 196 std::unique_ptr<LanguageComboboxModel> target_language_combobox_model_; |
197 | 197 |
198 views::Combobox* denial_combobox_; | 198 views::Combobox* denial_combobox_; |
199 views::Combobox* source_language_combobox_; | 199 views::Combobox* source_language_combobox_; |
200 views::Combobox* target_language_combobox_; | 200 views::Combobox* target_language_combobox_; |
201 | 201 |
202 views::Checkbox* always_translate_checkbox_; | 202 views::Checkbox* always_translate_checkbox_; |
203 | 203 |
204 views::LabelButton* advanced_cancel_button_; | 204 views::LabelButton* advanced_cancel_button_; |
205 views::LabelButton* advanced_done_button_; | 205 views::LabelButton* advanced_done_button_; |
206 | 206 |
207 scoped_ptr<TranslateBubbleModel> model_; | 207 std::unique_ptr<TranslateBubbleModel> model_; |
208 | 208 |
209 translate::TranslateErrors::Type error_type_; | 209 translate::TranslateErrors::Type error_type_; |
210 | 210 |
211 // Whether the window is an incognito window. | 211 // Whether the window is an incognito window. |
212 const bool is_in_incognito_window_; | 212 const bool is_in_incognito_window_; |
213 | 213 |
214 // Whether the translation is acutually executed. | 214 // Whether the translation is acutually executed. |
215 bool translate_executed_; | 215 bool translate_executed_; |
216 | 216 |
217 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 217 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
218 }; | 218 }; |
219 | 219 |
220 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 220 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
OLD | NEW |