| 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 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" | 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/i18n/string_compare.h" | 13 #include "base/i18n/string_compare.h" |
| 14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 16 #include "base/prefs/pref_service.h" | |
| 17 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 18 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/translate/chrome_translate_client.h" | 19 #include "chrome/browser/translate/chrome_translate_client.h" |
| 21 #include "chrome/browser/translate/translate_service.h" | 20 #include "chrome/browser/translate/translate_service.h" |
| 22 #include "chrome/browser/ui/chrome_pages.h" | 21 #include "chrome/browser/ui/chrome_pages.h" |
| 23 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h" | 22 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h" |
| 24 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
| 25 #include "chrome/grit/generated_resources.h" | 24 #include "chrome/grit/generated_resources.h" |
| 25 #include "components/prefs/pref_service.h" |
| 26 #include "components/translate/core/browser/translate_download_manager.h" | 26 #include "components/translate/core/browser/translate_download_manager.h" |
| 27 #include "components/translate/core/browser/translate_manager.h" | 27 #include "components/translate/core/browser/translate_manager.h" |
| 28 #include "components/translate/core/browser/translate_ui_delegate.h" | 28 #include "components/translate/core/browser/translate_ui_delegate.h" |
| 29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 30 #include "grit/components_strings.h" | 30 #include "grit/components_strings.h" |
| 31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
| 32 #include "ui/base/models/combobox_model.h" | 32 #include "ui/base/models/combobox_model.h" |
| 33 #include "ui/base/models/simple_combobox_model.h" | 33 #include "ui/base/models/simple_combobox_model.h" |
| 34 #include "ui/views/controls/button/checkbox.h" | 34 #include "ui/views/controls/button/checkbox.h" |
| 35 #include "ui/views/controls/button/label_button.h" | 35 #include "ui/views/controls/button/label_button.h" |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 base::string16 label; | 756 base::string16 label; |
| 757 if (model_->IsPageTranslatedInCurrentLanguages()) | 757 if (model_->IsPageTranslatedInCurrentLanguages()) |
| 758 label = l10n_util::GetStringUTF16(IDS_DONE); | 758 label = l10n_util::GetStringUTF16(IDS_DONE); |
| 759 else | 759 else |
| 760 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); | 760 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); |
| 761 advanced_done_button_->SetText(label); | 761 advanced_done_button_->SetText(label); |
| 762 advanced_done_button_->SizeToPreferredSize(); | 762 advanced_done_button_->SizeToPreferredSize(); |
| 763 if (advanced_view_) | 763 if (advanced_view_) |
| 764 advanced_view_->Layout(); | 764 advanced_view_->Layout(); |
| 765 } | 765 } |
| OLD | NEW |