OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/translate/core/browser/translate_infobar_delegate.h" | 5 #include "components/translate/core/browser/translate_infobar_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/i18n/string_compare.h" | 10 #include "base/i18n/string_compare.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 const int kNeverTranslateMinCount = 3; | 44 const int kNeverTranslateMinCount = 3; |
45 #endif | 45 #endif |
46 | 46 |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 const size_t TranslateInfoBarDelegate::kNoIndex = TranslateUIDelegate::kNoIndex; | 49 const size_t TranslateInfoBarDelegate::kNoIndex = TranslateUIDelegate::kNoIndex; |
50 | 50 |
51 TranslateInfoBarDelegate::~TranslateInfoBarDelegate() { | 51 TranslateInfoBarDelegate::~TranslateInfoBarDelegate() { |
52 } | 52 } |
53 | 53 |
| 54 infobars::InfoBarDelegate::InfoBarIdentifier |
| 55 TranslateInfoBarDelegate::GetIdentifier() const { |
| 56 return TRANSLATE_INFOBAR_DELEGATE; |
| 57 } |
| 58 |
54 // static | 59 // static |
55 void TranslateInfoBarDelegate::Create( | 60 void TranslateInfoBarDelegate::Create( |
56 bool replace_existing_infobar, | 61 bool replace_existing_infobar, |
57 const base::WeakPtr<TranslateManager>& translate_manager, | 62 const base::WeakPtr<TranslateManager>& translate_manager, |
58 infobars::InfoBarManager* infobar_manager, | 63 infobars::InfoBarManager* infobar_manager, |
59 bool is_off_the_record, | 64 bool is_off_the_record, |
60 translate::TranslateStep step, | 65 translate::TranslateStep step, |
61 const std::string& original_language, | 66 const std::string& original_language, |
62 const std::string& target_language, | 67 const std::string& target_language, |
63 TranslateErrors::Type error_type, | 68 TranslateErrors::Type error_type, |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 TranslationDeclined(); | 371 TranslationDeclined(); |
367 UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true); | 372 UMA_HISTOGRAM_BOOLEAN("Translate.DeclineTranslateCloseInfobar", true); |
368 } | 373 } |
369 | 374 |
370 TranslateInfoBarDelegate* | 375 TranslateInfoBarDelegate* |
371 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { | 376 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { |
372 return this; | 377 return this; |
373 } | 378 } |
374 | 379 |
375 } // namespace translate | 380 } // namespace translate |
OLD | NEW |