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 "ios/chrome/browser/translate/chrome_ios_translate_client.h" | 5 #include "ios/chrome/browser/translate/chrome_ios_translate_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/prefs/pref_service.h" | |
12 #include "components/infobars/core/infobar.h" | 11 #include "components/infobars/core/infobar.h" |
| 12 #include "components/prefs/pref_service.h" |
13 #include "components/translate/core/browser/page_translated_details.h" | 13 #include "components/translate/core/browser/page_translated_details.h" |
14 #include "components/translate/core/browser/translate_accept_languages.h" | 14 #include "components/translate/core/browser/translate_accept_languages.h" |
15 #include "components/translate/core/browser/translate_infobar_delegate.h" | 15 #include "components/translate/core/browser/translate_infobar_delegate.h" |
16 #include "components/translate/core/browser/translate_manager.h" | 16 #include "components/translate/core/browser/translate_manager.h" |
17 #include "components/translate/core/browser/translate_prefs.h" | 17 #include "components/translate/core/browser/translate_prefs.h" |
18 #include "components/translate/core/browser/translate_step.h" | 18 #include "components/translate/core/browser/translate_step.h" |
19 #include "ios/chrome/browser/infobars/infobar.h" | 19 #include "ios/chrome/browser/infobars/infobar.h" |
20 #include "ios/chrome/browser/infobars/infobar_controller.h" | 20 #include "ios/chrome/browser/infobars/infobar_controller.h" |
21 #include "ios/chrome/browser/infobars/infobar_manager_impl.h" | 21 #include "ios/chrome/browser/infobars/infobar_manager_impl.h" |
22 #include "ios/chrome/browser/pref_names.h" | 22 #include "ios/chrome/browser/pref_names.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 const GURL& report_url) { | 147 const GURL& report_url) { |
148 NOTREACHED(); | 148 NOTREACHED(); |
149 } | 149 } |
150 | 150 |
151 void ChromeIOSTranslateClient::WebStateDestroyed() { | 151 void ChromeIOSTranslateClient::WebStateDestroyed() { |
152 // Translation process can be interrupted. | 152 // Translation process can be interrupted. |
153 // Destroying the TranslateManager now guarantees that it never has to deal | 153 // Destroying the TranslateManager now guarantees that it never has to deal |
154 // with nullptr WebState. | 154 // with nullptr WebState. |
155 translate_manager_.reset(); | 155 translate_manager_.reset(); |
156 } | 156 } |
OLD | NEW |