Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H | |
| 6 #define IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H | |
| 7 | |
| 8 #import "ios/web_view/public/cwv_translation_controller.h" | |
| 9 | |
| 10 #include "components/translate/core/browser/translate_step.h" | |
| 11 #include "components/translate/core/common/translate_errors.h" | |
| 12 #import "ios/web/public/web_state/web_state.h" | |
| 13 #import "ios/web_view/internal/translate/web_view_translate_client.h" | |
| 14 | |
| 15 NS_ASSUME_NONNULL_BEGIN | |
| 16 | |
| 17 // Some internal methods needed to hide any C++ details. | |
| 18 @interface CWVTranslationController () | |
|
Eugene But (OOO till 7-30)
2017/04/28 07:18:07
nit: Should this be |CWVTranslationController (Int
jzw1
2017/04/28 09:55:33
No. I believe we want it to be an extension since
| |
| 19 | |
| 20 // Set to create a new translate stack under the new webState. | |
| 21 @property(nonatomic, assign) web::WebState* webState; | |
| 22 | |
| 23 // Called to keep this class informed of the current translate progress. | |
| 24 // |step| the state of current translation. | |
| 25 // |sourceLanguage| the source language associated with the current |step|. | |
| 26 // |targetLanguage| the target langauge associated with the current |step|. | |
| 27 // |errorType| the error, if any for the current |step|. | |
| 28 // |triggeredFromMenu| should be true if this was a result from user action. | |
| 29 - (void)updateTranslateStep:(translate::TranslateStep)step | |
| 30 sourceLanguage:(const std::string&)sourceLanguage | |
| 31 targetLanguage:(const std::string&)targetLanguage | |
| 32 errorType:(translate::TranslateErrors::Type)errorType | |
| 33 triggeredFromMenu:(bool)triggeredFromMenu; | |
| 34 | |
| 35 @end | |
| 36 | |
| 37 NS_ASSUME_NONNULL_END | |
| 38 | |
| 39 #endif // IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H | |
| OLD | NEW |