| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/translate/chrome_translate_client.h" | 12 #include "chrome/browser/translate/chrome_translate_client.h" |
| 13 #include "chrome/browser/ui/translate/language_combobox_model.h" | 13 #include "chrome/browser/ui/translate/language_combobox_model.h" |
| 14 #include "chrome/browser/ui/translate/translate_bubble_model.h" | 14 #include "chrome/browser/ui/translate/translate_bubble_model.h" |
| 15 #include "components/translate/core/common/translate_errors.h" | 15 #include "components/translate/core/common/translate_errors.h" |
| 16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
| 17 #include "ui/views/bubble/bubble_delegate.h" | 17 #include "ui/views/bubble/bubble_delegate.h" |
| 18 #include "ui/views/controls/button/button.h" | 18 #include "ui/views/controls/button/button.h" |
| 19 #include "ui/views/controls/combobox/combobox_listener.h" | 19 #include "ui/views/controls/combobox/combobox_listener.h" |
| 20 #include "ui/views/controls/link_listener.h" | 20 #include "ui/views/controls/link_listener.h" |
| 21 | 21 |
| 22 class PrefService; | 22 class PrefService; |
| 23 class TranslateDenialComboboxModel; |
| 23 | 24 |
| 24 namespace views { | 25 namespace views { |
| 25 class Checkbox; | 26 class Checkbox; |
| 26 class GridLayout; | 27 class GridLayout; |
| 27 class LabelButton; | 28 class LabelButton; |
| 28 class Link; | 29 class Link; |
| 29 class View; | 30 class View; |
| 30 } | 31 } |
| 31 | 32 |
| 32 class TranslateBubbleView : public views::BubbleDelegateView, | 33 class TranslateBubbleView : public views::BubbleDelegateView, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void UpdateAdvancedView(); | 163 void UpdateAdvancedView(); |
| 163 | 164 |
| 164 static TranslateBubbleView* translate_bubble_view_; | 165 static TranslateBubbleView* translate_bubble_view_; |
| 165 | 166 |
| 166 views::View* before_translate_view_; | 167 views::View* before_translate_view_; |
| 167 views::View* translating_view_; | 168 views::View* translating_view_; |
| 168 views::View* after_translate_view_; | 169 views::View* after_translate_view_; |
| 169 views::View* error_view_; | 170 views::View* error_view_; |
| 170 views::View* advanced_view_; | 171 views::View* advanced_view_; |
| 171 | 172 |
| 173 scoped_ptr<TranslateDenialComboboxModel> denial_combobox_model_; |
| 172 scoped_ptr<LanguageComboboxModel> source_language_combobox_model_; | 174 scoped_ptr<LanguageComboboxModel> source_language_combobox_model_; |
| 173 scoped_ptr<LanguageComboboxModel> target_language_combobox_model_; | 175 scoped_ptr<LanguageComboboxModel> target_language_combobox_model_; |
| 174 | 176 |
| 175 views::Combobox* denial_combobox_; | 177 views::Combobox* denial_combobox_; |
| 176 views::Combobox* source_language_combobox_; | 178 views::Combobox* source_language_combobox_; |
| 177 views::Combobox* target_language_combobox_; | 179 views::Combobox* target_language_combobox_; |
| 178 | 180 |
| 179 views::Checkbox* always_translate_checkbox_; | 181 views::Checkbox* always_translate_checkbox_; |
| 180 | 182 |
| 181 views::LabelButton* advanced_cancel_button_; | 183 views::LabelButton* advanced_cancel_button_; |
| 182 views::LabelButton* advanced_done_button_; | 184 views::LabelButton* advanced_done_button_; |
| 183 | 185 |
| 184 scoped_ptr<TranslateBubbleModel> model_; | 186 scoped_ptr<TranslateBubbleModel> model_; |
| 185 | 187 |
| 186 TranslateErrors::Type error_type_; | 188 TranslateErrors::Type error_type_; |
| 187 | 189 |
| 188 // Whether the window is an incognito window. | 190 // Whether the window is an incognito window. |
| 189 const bool is_in_incognito_window_; | 191 const bool is_in_incognito_window_; |
| 190 | 192 |
| 191 // Whether the translation is acutually executed. | 193 // Whether the translation is acutually executed. |
| 192 bool translate_executed_; | 194 bool translate_executed_; |
| 193 | 195 |
| 194 // Whether one of denial buttons is clicked. | 196 // Whether one of denial buttons is clicked. |
| 195 bool denial_button_clicked_; | 197 bool denial_button_clicked_; |
| 196 | 198 |
| 197 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); | 199 DISALLOW_COPY_AND_ASSIGN(TranslateBubbleView); |
| 198 }; | 200 }; |
| 199 | 201 |
| 200 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ | 202 #endif // CHROME_BROWSER_UI_VIEWS_TRANSLATE_TRANSLATE_BUBBLE_VIEW_H_ |
| OLD | NEW |