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

Issue 2839093002: Implemented new Translate API for purely Objective-C clients. (Closed)

Created:
3 years, 8 months ago by jzw1
Modified:
3 years, 7 months ago
CC:
chromium-reviews, ios-reviews+web_chromium.org, ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implemented new Translate API for purely Objective-C clients. BUG=706289 Review-Url: https://codereview.chromium.org/2839093002 Cr-Commit-Position: refs/heads/master@{#470236} Committed: https://chromium.googlesource.com/chromium/src/+/140c4b6e2b2db009b9a82a6316497b919c5031fe

Patch Set 1 #

Patch Set 2 : added CWV_EXPORT, header guards, and ARC guards. #

Patch Set 3 : Added some error handling. #

Total comments: 71

Patch Set 4 : addressed comments #

Patch Set 5 : address more issues #

Patch Set 6 : added TODO #

Total comments: 10

Patch Set 7 : change error codes and renamed some things #

Total comments: 20

Patch Set 8 : more comments addressed #

Patch Set 9 : missed a comment #

Patch Set 10 : rename param #

Total comments: 8

Patch Set 11 : addressed final comments #

Total comments: 59

Patch Set 12 : Addressed michael's comments #

Total comments: 2

Patch Set 13 : changed comment #

Patch Set 14 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+644 lines, -272 lines) Patch
M ios/web_view/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -4 lines 0 comments Download
M ios/web_view/internal/cwv_web_view.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +14 lines, -10 lines 0 comments Download
A ios/web_view/internal/translate/cwv_language_detection_result.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +32 lines, -0 lines 0 comments Download
A ios/web_view/internal/translate/cwv_language_detection_result_internal.h View 1 2 3 4 5 6 7 8 9 1 chunk +29 lines, -0 lines 0 comments Download
D ios/web_view/internal/translate/cwv_translate_manager_impl.h View 1 chunk +0 lines, -30 lines 0 comments Download
D ios/web_view/internal/translate/cwv_translate_manager_impl.mm View 1 chunk +0 lines, -41 lines 0 comments Download
A ios/web_view/internal/translate/cwv_translation_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +170 lines, -0 lines 0 comments Download
A ios/web_view/internal/translate/cwv_translation_controller_internal.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +43 lines, -0 lines 0 comments Download
A ios/web_view/internal/translate/cwv_translation_language.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +29 lines, -0 lines 0 comments Download
A ios/web_view/internal/translate/cwv_translation_language_internal.h View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
M ios/web_view/internal/translate/web_view_translate_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +11 lines, -7 lines 0 comments Download
M ios/web_view/internal/translate/web_view_translate_client.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -34 lines 0 comments Download
M ios/web_view/public/ChromeWebView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -2 lines 0 comments Download
A ios/web_view/public/cwv_language_detection_result.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +35 lines, -0 lines 0 comments Download
D ios/web_view/public/cwv_translate_delegate.h View 1 chunk +0 lines, -30 lines 0 comments Download
D ios/web_view/public/cwv_translate_manager.h View 1 chunk +0 lines, -22 lines 0 comments Download
A ios/web_view/public/cwv_translation_controller.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +71 lines, -0 lines 0 comments Download
A ios/web_view/public/cwv_translation_controller_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +46 lines, -0 lines 0 comments Download
A ios/web_view/public/cwv_translation_language.h View 1 2 3 4 5 6 7 1 chunk +30 lines, -0 lines 0 comments Download
M ios/web_view/public/cwv_web_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -4 lines 0 comments Download
M ios/web_view/shell/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A ios/web_view/shell/shell_translation_delegate.h View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
A ios/web_view/shell/shell_translation_delegate.m View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +63 lines, -0 lines 0 comments Download
M ios/web_view/shell/shell_view_controller.m View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +5 lines, -5 lines 0 comments Download
M ios/web_view/shell/translate_controller.h View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
M ios/web_view/shell/translate_controller.m View 1 2 3 1 chunk +0 lines, -67 lines 0 comments Download

Messages

Total messages: 41 (9 generated)
jzw1
On 2017/04/26 07:37:28, jzw1 wrote: > mailto:jzw@chromium.org changed reviewers: > + mailto:eugenebut@chromium.org, mailto:ichikawa@chromium.org, mailto:michaeldo@chromium.org Hey ...
3 years, 8 months ago (2017-04-26 07:37:56 UTC) #3
Hiroshi Ichikawa
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode290 ios/web_view/internal/cwv_web_view.mm:290: - (CWVTranslationController*)translationController { When -resetWebStateWithSessionStorage: is called after the ...
3 years, 8 months ago (2017-04-26 08:40:58 UTC) #4
Eugene But (OOO till 7-30)
Sorry, I had a chance to only look at public API https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): ...
3 years, 8 months ago (2017-04-26 20:15:31 UTC) #5
Hiroshi Ichikawa
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ios/web_view/public/cwv_language_detection_result.h:28: @property(nonatomic, readonly) CWVTranslationLanguage* targetLanguage; On 2017/04/26 20:15:30, Eugene But ...
3 years, 7 months ago (2017-04-27 02:41:54 UTC) #6
jzw1
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode290 ios/web_view/internal/cwv_web_view.mm:290: - (CWVTranslationController*)translationController { On 2017/04/26 08:40:57, Hiroshi Ichikawa wrote: ...
3 years, 7 months ago (2017-04-27 04:54:02 UTC) #7
Hiroshi Ichikawa
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode290 ios/web_view/internal/cwv_web_view.mm:290: - (CWVTranslationController*)translationController { On 2017/04/27 04:54:01, jzw1 wrote: > ...
3 years, 7 months ago (2017-04-27 05:35:42 UTC) #8
jzw1
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode290 ios/web_view/internal/cwv_web_view.mm:290: - (CWVTranslationController*)translationController { On 2017/04/27 05:35:42, Hiroshi Ichikawa wrote: ...
3 years, 7 months ago (2017-04-27 07:03:18 UTC) #9
Hiroshi Ichikawa
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/internal/cwv_web_view.mm#newcode290 ios/web_view/internal/cwv_web_view.mm:290: - (CWVTranslationController*)translationController { On 2017/04/27 07:03:18, jzw1 wrote: > ...
3 years, 7 months ago (2017-04-27 07:17:23 UTC) #10
jzw1
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_translation_controller.h File ios/web_view/public/cwv_translation_controller.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_translation_controller.h#newcode77 ios/web_view/public/cwv_translation_controller.h:77: // Begins translation on the current page from |sourceLanguage| ...
3 years, 7 months ago (2017-04-27 07:22:02 UTC) #11
Hiroshi Ichikawa
lgtm
3 years, 7 months ago (2017-04-27 07:28:10 UTC) #12
jzw1
On 2017/04/27 07:28:10, Hiroshi Ichikawa wrote: > lgtm appreciate it. I'll wait for eugene/michael's LGTM. ...
3 years, 7 months ago (2017-04-27 07:29:51 UTC) #13
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ios/web_view/public/cwv_language_detection_result.h:28: @property(nonatomic, readonly) CWVTranslationLanguage* targetLanguage; On 2017/04/27 04:54:01, jzw1 wrote: ...
3 years, 7 months ago (2017-04-27 13:08:09 UTC) #14
jzw1
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ios/web_view/public/cwv_language_detection_result.h:28: @property(nonatomic, readonly) CWVTranslationLanguage* targetLanguage; On 2017/04/27 13:08:08, Eugene But ...
3 years, 7 months ago (2017-04-28 02:34:54 UTC) #15
Hiroshi Ichikawa
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_translation_language.h File ios/web_view/public/cwv_translation_language.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_translation_language.h#newcode20 ios/web_view/public/cwv_translation_language.h:20: // The language name in the current OS locale. ...
3 years, 7 months ago (2017-04-28 02:49:51 UTC) #16
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ios/web_view/public/cwv_language_detection_result.h:28: @property(nonatomic, readonly) CWVTranslationLanguage* targetLanguage; On 2017/04/28 02:34:53, jzw1 wrote: ...
3 years, 7 months ago (2017-04-28 03:07:29 UTC) #17
jzw1
PTAL https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ios/web_view/public/cwv_language_detection_result.h:28: @property(nonatomic, readonly) CWVTranslationLanguage* targetLanguage; On 2017/04/28 03:07:28, Eugene ...
3 years, 7 months ago (2017-04-28 05:43:36 UTC) #18
Hiroshi Ichikawa
https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h File ios/web_view/public/cwv_language_detection_result.h (right): https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ios/web_view/public/cwv_language_detection_result.h:28: @property(nonatomic, readonly) CWVTranslationLanguage* targetLanguage; On 2017/04/28 05:43:35, jzw1 wrote: ...
3 years, 7 months ago (2017-04-28 05:50:06 UTC) #19
jzw1
On 2017/04/28 05:50:06, Hiroshi Ichikawa wrote: > https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h > File ios/web_view/public/cwv_language_detection_result.h (right): > > https://codereview.chromium.org/2839093002/diff/40001/ios/web_view/public/cwv_language_detection_result.h#newcode28 ...
3 years, 7 months ago (2017-04-28 05:58:08 UTC) #20
Hiroshi Ichikawa
On 2017/04/28 05:58:08, jzw1 wrote: > On 2017/04/28 05:50:06, Hiroshi Ichikawa wrote: > > > ...
3 years, 7 months ago (2017-04-28 06:02:13 UTC) #21
Eugene But (OOO till 7-30)
On 2017/04/28 06:02:13, Hiroshi Ichikawa wrote: > On 2017/04/28 05:58:08, jzw1 wrote: > > On ...
3 years, 7 months ago (2017-04-28 07:08:31 UTC) #22
Eugene But (OOO till 7-30)
lgtm! Thank you for the patience. https://codereview.chromium.org/2839093002/diff/100001/ios/web_view/internal/translate/cwv_language_detection_result.mm File ios/web_view/internal/translate/cwv_language_detection_result.mm (right): https://codereview.chromium.org/2839093002/diff/100001/ios/web_view/internal/translate/cwv_language_detection_result.mm#newcode28 ios/web_view/internal/translate/cwv_language_detection_result.mm:28: _supportedLanguages = supportedLanguages; ...
3 years, 7 months ago (2017-04-28 07:18:07 UTC) #23
jzw1
https://codereview.chromium.org/2839093002/diff/180001/ios/web_view/internal/translate/cwv_translation_controller.mm File ios/web_view/internal/translate/cwv_translation_controller.mm (right): https://codereview.chromium.org/2839093002/diff/180001/ios/web_view/internal/translate/cwv_translation_controller.mm#newcode45 ios/web_view/internal/translate/cwv_translation_controller.mm:45: // Private interface. On 2017/04/28 07:18:07, Eugene But wrote: ...
3 years, 7 months ago (2017-04-28 09:55:33 UTC) #24
jzw1
On 2017/04/28 09:55:33, jzw1 wrote: > https://codereview.chromium.org/2839093002/diff/180001/ios/web_view/internal/translate/cwv_translation_controller.mm > File ios/web_view/internal/translate/cwv_translation_controller.mm (right): > > https://codereview.chromium.org/2839093002/diff/180001/ios/web_view/internal/translate/cwv_translation_controller.mm#newcode45 > ...
3 years, 7 months ago (2017-04-28 09:56:45 UTC) #25
Eugene But (OOO till 7-30)
On 2017/04/28 09:56:45, jzw1 wrote: > On 2017/04/28 09:55:33, jzw1 wrote: > > > https://codereview.chromium.org/2839093002/diff/180001/ios/web_view/internal/translate/cwv_translation_controller.mm ...
3 years, 7 months ago (2017-04-28 10:10:43 UTC) #26
michaeldo
Sorry for the delay, I wasn't able to get to this last week. This looks ...
3 years, 7 months ago (2017-05-01 18:25:38 UTC) #27
jzw1
https://codereview.chromium.org/2839093002/diff/200001/ios/web_view/internal/cwv_web_view.mm File ios/web_view/internal/cwv_web_view.mm (right): https://codereview.chromium.org/2839093002/diff/200001/ios/web_view/internal/cwv_web_view.mm#newcode88 ios/web_view/internal/cwv_web_view.mm:88: @synthesize translationController = _translationController; On 2017/05/01 18:25:36, michaeldo wrote: ...
3 years, 7 months ago (2017-05-08 03:36:29 UTC) #28
michaeldo
LGTM. Thank you very much! https://codereview.chromium.org/2839093002/diff/200001/ios/web_view/internal/translate/cwv_translation_controller.mm File ios/web_view/internal/translate/cwv_translation_controller.mm (right): https://codereview.chromium.org/2839093002/diff/200001/ios/web_view/internal/translate/cwv_translation_controller.mm#newcode72 ios/web_view/internal/translate/cwv_translation_controller.mm:72: _translateClient->set_translation_controller(self); On 2017/05/08 03:36:28, ...
3 years, 7 months ago (2017-05-08 15:15:49 UTC) #29
jzw1
thanks everyone. https://codereview.chromium.org/2839093002/diff/220001/ios/web_view/internal/translate/web_view_translate_client.h File ios/web_view/internal/translate/web_view_translate_client.h (right): https://codereview.chromium.org/2839093002/diff/220001/ios/web_view/internal/translate/web_view_translate_client.h#newcode40 ios/web_view/internal/translate/web_view_translate_client.h:40: // This |controller| will outlive this class. ...
3 years, 7 months ago (2017-05-09 00:47:20 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2839093002/240001
3 years, 7 months ago (2017-05-09 01:52:39 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/264400) android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 7 months ago (2017-05-09 01:59:07 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2839093002/260001
3 years, 7 months ago (2017-05-09 03:52:34 UTC) #38
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 05:30:42 UTC) #41
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/140c4b6e2b2db009b9a82a631649...

Powered by Google App Engine
This is Rietveld 408576698