OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/translate_infobars.h" | 5 #include "chrome/browser/views/infobars/translate_infobars.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/gfx/canvas.h" | |
11 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
13 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
14 #include "chrome/app/chrome_dll_resource.h" | 13 #include "chrome/app/chrome_dll_resource.h" |
15 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
16 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
17 #include "chrome/browser/translate/languages_menu_model.h" | 16 #include "chrome/browser/translate/languages_menu_model.h" |
18 #include "chrome/browser/translate/options_menu_model.h" | 17 #include "chrome/browser/translate/options_menu_model.h" |
| 18 #include "gfx/canvas.h" |
19 #include "grit/app_resources.h" | 19 #include "grit/app_resources.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "grit/locale_settings.h" | 21 #include "grit/locale_settings.h" |
22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
23 #include "views/controls/button/image_button.h" | 23 #include "views/controls/button/image_button.h" |
24 #include "views/controls/button/menu_button.h" | 24 #include "views/controls/button/menu_button.h" |
25 #include "views/controls/button/text_button.h" | 25 #include "views/controls/button/text_button.h" |
26 #include "views/controls/image_view.h" | 26 #include "views/controls/image_view.h" |
27 #include "views/controls/label.h" | 27 #include "views/controls/label.h" |
28 | 28 |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 inline int TranslateInfoBar::GetSpacingAfterFirstLanguageButton() const { | 788 inline int TranslateInfoBar::GetSpacingAfterFirstLanguageButton() const { |
789 return (GetDelegate()->state() == TranslateInfoBarDelegate::kAfterTranslate ? | 789 return (GetDelegate()->state() == TranslateInfoBarDelegate::kAfterTranslate ? |
790 kButtonInLabelSpacing : 10); | 790 kButtonInLabelSpacing : 10); |
791 } | 791 } |
792 | 792 |
793 // TranslateInfoBarDelegate, InfoBarDelegate overrides: ------------------ | 793 // TranslateInfoBarDelegate, InfoBarDelegate overrides: ------------------ |
794 | 794 |
795 InfoBar* TranslateInfoBarDelegate::CreateInfoBar() { | 795 InfoBar* TranslateInfoBarDelegate::CreateInfoBar() { |
796 return new TranslateInfoBar(this); | 796 return new TranslateInfoBar(this); |
797 } | 797 } |
OLD | NEW |