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

Unified Diff: ios/web_view/internal/translate/cwv_translation_controller_internal.h

Issue 2839093002: Implemented new Translate API for purely Objective-C clients. (Closed)
Patch Set: added TODO Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ios/web_view/internal/translate/cwv_translation_controller_internal.h
diff --git a/ios/web_view/internal/translate/cwv_translation_controller_internal.h b/ios/web_view/internal/translate/cwv_translation_controller_internal.h
new file mode 100644
index 0000000000000000000000000000000000000000..b0950949a61e432673bf5b032acf0204aa6f0c27
--- /dev/null
+++ b/ios/web_view/internal/translate/cwv_translation_controller_internal.h
@@ -0,0 +1,32 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H
+#define IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H
+
+#import "ios/web_view/public/cwv_translation_controller.h"
+
+#include "components/translate/core/browser/translate_step.h"
+#include "components/translate/core/common/translate_errors.h"
+#import "ios/web/public/web_state/web_state.h"
+#import "ios/web_view/internal/translate/web_view_translate_client.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+// Some internal methods needed to hide any C++ details.
+@interface CWVTranslationController ()
+
+@property(nonatomic, assign) web::WebState* webState;
Eugene But (OOO till 7-30) 2017/04/27 13:08:08 Could you please write comment for these methods.
jzw1 2017/04/28 02:34:54 Done.
+
+- (void)updateTranslateStep:(translate::TranslateStep)step
+ sourceLanguage:(const std::string&)sourceLanguage
+ targetLanguage:(const std::string&)targetLanguage
+ errorType:(translate::TranslateErrors::Type)errorType
+ triggeredFromMenu:(bool)triggeredFromMenu;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif // IOS_WEB_VIEW_INTERNAL_TRANSLATE_CWV_TRANSLATION_CONTROLLER_INTERNAL_H

Powered by Google App Engine
This is Rietveld 408576698