| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/views/infobars/after_translate_infobar.h" | 5 #include "chrome/browser/ui/views/infobars/after_translate_infobar.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/translate/options_menu_model.h" | 9 #include "chrome/browser/translate/options_menu_model.h" |
| 10 #include "chrome/browser/translate/translate_infobar_delegate.h" | 10 #include "chrome/browser/translate/translate_infobar_delegate.h" |
| 11 #include "chrome/browser/views/infobars/infobar_button_border.h" | 11 #include "chrome/browser/ui/views/infobars/infobar_button_border.h" |
| 12 #include "chrome/browser/views/infobars/infobar_text_button.h" | 12 #include "chrome/browser/ui/views/infobars/infobar_text_button.h" |
| 13 #include "grit/app_resources.h" | 13 #include "grit/app_resources.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 15 #include "views/controls/button/menu_button.h" | 15 #include "views/controls/button/menu_button.h" |
| 16 #include "views/controls/button/text_button.h" | 16 #include "views/controls/button/text_button.h" |
| 17 #include "views/controls/image_view.h" | 17 #include "views/controls/image_view.h" |
| 18 #include "views/controls/label.h" | 18 #include "views/controls/label.h" |
| 19 #include "views/controls/menu/menu_2.h" | 19 #include "views/controls/menu/menu_2.h" |
| 20 | 20 |
| 21 AfterTranslateInfoBar::AfterTranslateInfoBar( | 21 AfterTranslateInfoBar::AfterTranslateInfoBar( |
| 22 TranslateInfoBarDelegate* delegate) | 22 TranslateInfoBarDelegate* delegate) |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 } | 160 } |
| 161 string16 language = | 161 string16 language = |
| 162 GetDelegate()->GetLanguageDisplayableNameAt(language_index); | 162 GetDelegate()->GetLanguageDisplayableNameAt(language_index); |
| 163 language_button->SetText(UTF16ToWideHack(language)); | 163 language_button->SetText(UTF16ToWideHack(language)); |
| 164 // The following line is necessary for the preferred size to be recomputed. | 164 // The following line is necessary for the preferred size to be recomputed. |
| 165 language_button->ClearMaxTextSize(); | 165 language_button->ClearMaxTextSize(); |
| 166 // The button may have to grow to show the new text. | 166 // The button may have to grow to show the new text. |
| 167 Layout(); | 167 Layout(); |
| 168 SchedulePaint(); | 168 SchedulePaint(); |
| 169 } | 169 } |
| OLD | NEW |