Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: components/translate/ios/browser/language_detection_controller.h

Issue 835203002: Added |load_completion_status| to WebStateObserver's |PageLoaded|. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef COMPONENTS_TRANSLATE_IOS_BROWSER_LANGUAGE_DETECTION_CONTROLLER_H_ 5 #ifndef COMPONENTS_TRANSLATE_IOS_BROWSER_LANGUAGE_DETECTION_CONTROLLER_H_
6 #define COMPONENTS_TRANSLATE_IOS_BROWSER_LANGUAGE_DETECTION_CONTROLLER_H_ 6 #define COMPONENTS_TRANSLATE_IOS_BROWSER_LANGUAGE_DETECTION_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_list.h" 10 #include "base/callback_list.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const GURL& url, 69 const GURL& url,
70 bool interacting); 70 bool interacting);
71 71
72 // Completion handler used to retrieve the text buffered by the 72 // Completion handler used to retrieve the text buffered by the
73 // JsLanguageDetectionManager. 73 // JsLanguageDetectionManager.
74 void OnTextRetrieved(const std::string& http_content_language, 74 void OnTextRetrieved(const std::string& http_content_language,
75 const std::string& html_lang, 75 const std::string& html_lang,
76 const base::string16& text); 76 const base::string16& text);
77 77
78 // web::WebStateObserver implementation: 78 // web::WebStateObserver implementation:
79 void PageLoaded() override; 79 void PageLoaded(
80 web::PageLoadCompletionStatus load_completion_status) override;
80 void URLHashChanged() override; 81 void URLHashChanged() override;
81 void HistoryStateChanged() override; 82 void HistoryStateChanged() override;
82 void WebStateDestroyed() override; 83 void WebStateDestroyed() override;
83 84
84 CallbackList language_detection_callbacks_; 85 CallbackList language_detection_callbacks_;
85 base::scoped_nsobject<JsLanguageDetectionManager> js_manager_; 86 base::scoped_nsobject<JsLanguageDetectionManager> js_manager_;
86 BooleanPrefMember translate_enabled_; 87 BooleanPrefMember translate_enabled_;
87 base::WeakPtrFactory<LanguageDetectionController> weak_method_factory_; 88 base::WeakPtrFactory<LanguageDetectionController> weak_method_factory_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(LanguageDetectionController); 90 DISALLOW_COPY_AND_ASSIGN(LanguageDetectionController);
90 }; 91 };
91 92
92 } // namespace translate 93 } // namespace translate
93 94
94 #endif // COMPONENTS_TRANSLATE_IOS_BROWSER_LANGUAGE_DETECTION_CONTROLLER_H_ 95 #endif // COMPONENTS_TRANSLATE_IOS_BROWSER_LANGUAGE_DETECTION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698