OLD | NEW |
1 // Copyright (c) 2011 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/translate/translate_manager.h" | 5 #include "chrome/browser/translate/translate_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "base/message_loop.h" |
12 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
13 #include "base/string_split.h" | 14 #include "base/string_split.h" |
14 #include "base/string_util.h" | 15 #include "base/string_util.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/infobars/infobar_tab_helper.h" | 18 #include "chrome/browser/infobars/infobar_tab_helper.h" |
18 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
19 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/tab_contents/language_state.h" | 21 #include "chrome/browser/tab_contents/language_state.h" |
21 #include "chrome/browser/tab_contents/tab_util.h" | 22 #include "chrome/browser/tab_contents/tab_util.h" |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper(); | 829 InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper(); |
829 | 830 |
830 for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) { | 831 for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) { |
831 TranslateInfoBarDelegate* delegate = | 832 TranslateInfoBarDelegate* delegate = |
832 infobar_helper->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate(); | 833 infobar_helper->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate(); |
833 if (delegate) | 834 if (delegate) |
834 return delegate; | 835 return delegate; |
835 } | 836 } |
836 return NULL; | 837 return NULL; |
837 } | 838 } |
OLD | NEW |