| 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 11 matching lines...) Expand all Loading... |
| 22 class PrefService; | 22 class PrefService; |
| 23 | 23 |
| 24 namespace views { | 24 namespace views { |
| 25 class Checkbox; | 25 class Checkbox; |
| 26 class GridLayout; | 26 class GridLayout; |
| 27 class LabelButton; | 27 class LabelButton; |
| 28 class Link; | 28 class Link; |
| 29 class View; | 29 class View; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace ui { |
| 33 class SimpleComboboxModel; |
| 34 } |
| 35 |
| 32 class TranslateBubbleView : public views::BubbleDelegateView, | 36 class TranslateBubbleView : public views::BubbleDelegateView, |
| 33 public views::ButtonListener, | 37 public views::ButtonListener, |
| 34 public views::ComboboxListener, | 38 public views::ComboboxListener, |
| 35 public views::LinkListener, | 39 public views::LinkListener, |
| 36 public content::WebContentsObserver { | 40 public content::WebContentsObserver { |
| 37 public: | 41 public: |
| 38 virtual ~TranslateBubbleView(); | 42 virtual ~TranslateBubbleView(); |
| 39 | 43 |
| 40 // Shows the Translate bubble. | 44 // Shows the Translate bubble. |
| 41 static void ShowBubble(views::View* anchor_view, | 45 static void ShowBubble(views::View* anchor_view, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void UpdateAdvancedView(); | 166 void UpdateAdvancedView(); |
| 163 | 167 |
| 164 static TranslateBubbleView* translate_bubble_view_; | 168 static TranslateBubbleView* translate_bubble_view_; |
| 165 | 169 |
| 166 views::View* before_translate_view_; | 170 views::View* before_translate_view_; |
| 167 views::View* translating_view_; | 171 views::View* translating_view_; |
| 168 views::View* after_translate_view_; | 172 views::View* after_translate_view_; |
| 169 views::View* error_view_; | 173 views::View* error_view_; |
| 170 views::View* advanced_view_; | 174 views::View* advanced_view_; |
| 171 | 175 |
| 176 scoped_ptr<ui::SimpleComboboxModel> denial_combobox_model_; |
| 172 scoped_ptr<LanguageComboboxModel> source_language_combobox_model_; | 177 scoped_ptr<LanguageComboboxModel> source_language_combobox_model_; |
| 173 scoped_ptr<LanguageComboboxModel> target_language_combobox_model_; | 178 scoped_ptr<LanguageComboboxModel> target_language_combobox_model_; |
| 174 | 179 |
| 175 views::Combobox* denial_combobox_; | 180 views::Combobox* denial_combobox_; |
| 176 views::Combobox* source_language_combobox_; | 181 views::Combobox* source_language_combobox_; |
| 177 views::Combobox* target_language_combobox_; | 182 views::Combobox* target_language_combobox_; |
| 178 | 183 |
| 179 views::Checkbox* always_translate_checkbox_; | 184 views::Checkbox* always_translate_checkbox_; |
| 180 | 185 |
| 181 views::LabelButton* advanced_cancel_button_; | 186 views::LabelButton* advanced_cancel_button_; |
| 182 views::LabelButton* advanced_done_button_; | 187 views::LabelButton* advanced_done_button_; |
| 183 | 188 |
| 184 scoped_ptr<TranslateBubbleModel> model_; | 189 scoped_ptr<TranslateBubbleModel> model_; |
| 185 | 190 |
| 186 TranslateErrors::Type error_type_; | 191 TranslateErrors::Type error_type_; |
| 187 | 192 |
| 188 // Whether the window is an incognito window. | 193 // Whether the window is an incognito window. |
| 189 const bool is_in_incognito_window_; | 194 const bool is_in_incognito_window_; |
| 190 | 195 |
| 191 // Whether the translation is acutually executed. | 196 // Whether the translation is acutually executed. |
| 192 bool translate_executed_; | 197 bool translate_executed_; |
| 193 | 198 |
| 194 // Whether one of denial buttons is clicked. | 199 // Whether one of denial buttons is clicked. |
| 195 bool denial_button_clicked_; | 200 bool denial_button_clicked_; |
| 196 | 201 |
| 197 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 202 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
| 198 }; | 203 }; |
| 199 | 204 |
| 200 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 205 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
| OLD | NEW |