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/ios/browser/language_detection_controller.h" | 5 #include "components/translate/ios/browser/language_detection_controller.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 | 127 |
128 // web::WebStateObserver implementation: | 128 // web::WebStateObserver implementation: |
129 | 129 |
130 void LanguageDetectionController::PageLoaded( | 130 void LanguageDetectionController::PageLoaded( |
131 web::PageLoadCompletionStatus load_completion_status) { | 131 web::PageLoadCompletionStatus load_completion_status) { |
132 if (load_completion_status == web::PageLoadCompletionStatus::SUCCESS) | 132 if (load_completion_status == web::PageLoadCompletionStatus::SUCCESS) |
133 StartLanguageDetection(); | 133 StartLanguageDetection(); |
134 } | 134 } |
135 | 135 |
136 void LanguageDetectionController::URLHashChanged() { | 136 void LanguageDetectionController::UrlHashChanged() { |
137 StartLanguageDetection(); | 137 StartLanguageDetection(); |
138 } | 138 } |
139 | 139 |
140 void LanguageDetectionController::HistoryStateChanged() { | 140 void LanguageDetectionController::HistoryStateChanged() { |
141 StartLanguageDetection(); | 141 StartLanguageDetection(); |
142 } | 142 } |
143 | 143 |
144 void LanguageDetectionController::WebStateDestroyed() { | 144 void LanguageDetectionController::WebStateDestroyed() { |
145 web_state()->RemoveScriptCommandCallback(kCommandPrefix); | 145 web_state()->RemoveScriptCommandCallback(kCommandPrefix); |
146 } | 146 } |
147 | 147 |
148 } // namespace translate | 148 } // namespace translate |
OLD | NEW |