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" | |
|
michaeldo
2017/05/01 18:25:37
Please replace translate_step and web_state with "
jzw1
2017/05/08 03:36:28
How do I forward declare the translate_step enum?
michaeldo
2017/05/08 15:15:48
Sorry, didn't realize it was for the enum. You can
| |
| 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" | |
|
michaeldo
2017/05/01 18:25:37
Is web_view_translate_client.h import needed?
jzw1
2017/05/08 03:36:28
Thanks for catch
| |
| 14 | |
| 15 NS_ASSUME_NONNULL_BEGIN | |
| 16 | |
| 17 // Some internal methods needed to hide any C++ details. | |
| 18 @interface CWVTranslationController () | |
| 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 |