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

Side by Side Diff: chrome/browser/ui/views/translate/translate_bubble_view.h

Issue 2088053002: Split to use two different ID for the two different checkbox in two different subview. Currently th… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/views/translate/translate_bubble_view.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_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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Creates the 'after translate' view. Caller takes ownership of the returned 204 // Creates the 'after translate' view. Caller takes ownership of the returned
205 // view. 205 // view.
206 views::View* CreateViewAfterTranslate(); 206 views::View* CreateViewAfterTranslate();
207 207
208 // Creates the 'error' view. Caller takes ownership of the returned view. 208 // Creates the 'error' view. Caller takes ownership of the returned view.
209 views::View* CreateViewError(); 209 views::View* CreateViewError();
210 210
211 // Creates the 'advanced' view. Caller takes ownership of the returned view. 211 // Creates the 'advanced' view. Caller takes ownership of the returned view.
212 views::View* CreateViewAdvanced(); 212 views::View* CreateViewAdvanced();
213 213
214 // Get the current always translate checkbox
215 views::Checkbox* GetAlwaysTranslateCheckbox();
216
214 // Switches the view type. 217 // Switches the view type.
215 void SwitchView(TranslateBubbleModel::ViewState view_state); 218 void SwitchView(TranslateBubbleModel::ViewState view_state);
216 219
217 // Switches to the error view. 220 // Switches to the error view.
218 void SwitchToErrorView(translate::TranslateErrors::Type error_type); 221 void SwitchToErrorView(translate::TranslateErrors::Type error_type);
219 222
220 // Updates the advanced view. 223 // Updates the advanced view.
221 void UpdateAdvancedView(); 224 void UpdateAdvancedView();
222 225
223 static TranslateBubbleView* translate_bubble_view_; 226 static TranslateBubbleView* translate_bubble_view_;
224 227
225 views::View* before_translate_view_; 228 views::View* before_translate_view_;
226 views::View* translating_view_; 229 views::View* translating_view_;
227 views::View* after_translate_view_; 230 views::View* after_translate_view_;
228 views::View* error_view_; 231 views::View* error_view_;
229 views::View* advanced_view_; 232 views::View* advanced_view_;
230 233
231 std::unique_ptr<ui::SimpleComboboxModel> denial_combobox_model_; 234 std::unique_ptr<ui::SimpleComboboxModel> denial_combobox_model_;
232 std::unique_ptr<LanguageComboboxModel> source_language_combobox_model_; 235 std::unique_ptr<LanguageComboboxModel> source_language_combobox_model_;
233 std::unique_ptr<LanguageComboboxModel> target_language_combobox_model_; 236 std::unique_ptr<LanguageComboboxModel> target_language_combobox_model_;
234 237
235 views::Combobox* denial_combobox_; 238 views::Combobox* denial_combobox_;
236 views::Combobox* source_language_combobox_; 239 views::Combobox* source_language_combobox_;
237 views::Combobox* target_language_combobox_; 240 views::Combobox* target_language_combobox_;
238 241
239 views::Checkbox* always_translate_checkbox_; 242 views::Checkbox* before_always_translate_checkbox_;
243 views::Checkbox* advanced_always_translate_checkbox_;
240 244
241 views::LabelButton* advanced_cancel_button_; 245 views::LabelButton* advanced_cancel_button_;
242 views::LabelButton* advanced_done_button_; 246 views::LabelButton* advanced_done_button_;
243 247
244 views::MenuButton* denial_menu_button_; 248 views::MenuButton* denial_menu_button_;
245 std::unique_ptr<ui::SimpleMenuModel> denial_menu_model_; 249 std::unique_ptr<ui::SimpleMenuModel> denial_menu_model_;
246 std::unique_ptr<views::MenuRunner> denial_menu_runner_; 250 std::unique_ptr<views::MenuRunner> denial_menu_runner_;
247 251
248 std::unique_ptr<TranslateBubbleModel> model_; 252 std::unique_ptr<TranslateBubbleModel> model_;
249 253
250 translate::TranslateErrors::Type error_type_; 254 translate::TranslateErrors::Type error_type_;
251 255
252 // Whether the window is an incognito window. 256 // Whether the window is an incognito window.
253 const bool is_in_incognito_window_; 257 const bool is_in_incognito_window_;
254 258
259 bool should_always_translate_;
260
255 std::unique_ptr<WebContentMouseHandler> mouse_handler_; 261 std::unique_ptr<WebContentMouseHandler> mouse_handler_;
256 262
257 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); 263 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView);
258 }; 264 };
259 265
260 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ 266 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/translate/translate_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698