OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/translate/translate_infobar_delegate.h" | 5 #include "chrome/browser/translate/translate_infobar_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/i18n/string_compare.h" | 9 #include "base/i18n/string_compare.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/infobars/infobar.h" | 13 #include "chrome/browser/infobars/infobar.h" |
14 #include "chrome/browser/infobars/infobar_manager.h" | 14 #include "chrome/browser/infobars/infobar_manager.h" |
15 #include "chrome/browser/infobars/infobar_service.h" | 15 #include "chrome/browser/infobars/infobar_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/translate/translate_manager.h" | |
18 #include "chrome/browser/translate/translate_tab_helper.h" | 17 #include "chrome/browser/translate/translate_tab_helper.h" |
19 #include "components/translate/core/browser/translate_accept_languages.h" | 18 #include "components/translate/core/browser/translate_accept_languages.h" |
20 #include "components/translate/core/browser/translate_download_manager.h" | 19 #include "components/translate/core/browser/translate_download_manager.h" |
| 20 #include "components/translate/core/browser/translate_manager.h" |
21 #include "components/translate/core/common/translate_constants.h" | 21 #include "components/translate/core/common/translate_constants.h" |
22 #include "content/public/browser/navigation_entry.h" | 22 #include "content/public/browser/navigation_entry.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
26 #include "third_party/icu/source/i18n/unicode/coll.h" | 26 #include "third_party/icu/source/i18n/unicode/coll.h" |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 if (!details.is_navigation_to_different_page && !details.is_main_frame) | 373 if (!details.is_navigation_to_different_page && !details.is_main_frame) |
374 return false; | 374 return false; |
375 | 375 |
376 return InfoBarDelegate::ShouldExpireInternal(details); | 376 return InfoBarDelegate::ShouldExpireInternal(details); |
377 } | 377 } |
378 | 378 |
379 TranslateInfoBarDelegate* | 379 TranslateInfoBarDelegate* |
380 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { | 380 TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { |
381 return this; | 381 return this; |
382 } | 382 } |
OLD | NEW |