| 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 <string> |
| 11 |
| 12 #include "components/translate/core/browser/translate_step.h" |
| 13 #include "components/translate/core/common/translate_errors.h" |
| 14 |
| 15 namespace web { |
| 16 class WebState; |
| 17 } |
| 18 |
| 19 NS_ASSUME_NONNULL_BEGIN |
| 20 |
| 21 // Some internal methods needed to hide any C++ details. |
| 22 @interface CWVTranslationController () |
| 23 |
| 24 // Set to create a new translate stack under the new webState. |
| 25 @property(nonatomic, assign) web::WebState* webState; |
| 26 |
| 27 // Called to keep this class informed of the current translate progress. |
| 28 // |step| the state of current translation. |
| 29 // |sourceLanguage| the source language associated with the current |step|. |
| 30 // |targetLanguage| the target langauge associated with the current |step|. |
| 31 // |errorType| the error, if any for the current |step|. |
| 32 // |triggeredFromMenu| should be true if this was a result from user action. |
| 33 - (void)updateTranslateStep:(translate::TranslateStep)step |
| 34 sourceLanguage:(const std::string&)sourceLanguage |
| 35 targetLanguage:(const std::string&)targetLanguage |
| 36 errorType:(translate::TranslateErrors::Type)errorType |
| 37 triggeredFromMenu:(bool)triggeredFromMenu; |
| 38 |
| 39 @end |
| 40 |
| 41 NS_ASSUME_NONNULL_END |
| 42 |
| 43 #endif // IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H |
| OLD | NEW |