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

Issue 2164483006: [MacViews] Implemented text context menu (Closed)

Created:
4 years, 5 months ago by spqchan
Modified:
3 years, 10 months ago
CC:
chromium-reviews, tfarina, James Su, shuchen+watch_chromium.org, yusukes+watch_chromium.org, nona+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MacViews] Implemented text context menu - Added Speech, Writing Direction and Look Up - Introduced text_services_context_menu to create and handle the items - Moved the the code from render_view_context_menu_mac into text_services_context_menu - Created views_text_context_menu to bridge Views with text_services_context_menu BUG=617436 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2164483006 Cr-Commit-Position: refs/heads/master@{#448526} Committed: https://chromium.googlesource.com/chromium/src/+/375ddabe9cdc45673e112c5b1b06cc754aa45759

Patch Set 1 #

Patch Set 2 : ditto #

Total comments: 49

Patch Set 3 : Addressed tapted's comments and made things work #

Total comments: 113

Patch Set 4 : Fix for tapted #

Total comments: 12

Patch Set 5 : Fix for tapted 2 #

Total comments: 8

Patch Set 6 : Fix for tapted 3 #

Total comments: 70

Patch Set 7 : Addressed tapted's comments and fixed tests #

Total comments: 14

Patch Set 8 : Addressed tapted's comments and added a test #

Total comments: 29

Patch Set 9 : Addressed msw's comments, changed 2016 to 2017 #

Total comments: 19

Patch Set 10 : Rebased #

Total comments: 20

Patch Set 11 : Addressed comments #

Total comments: 9

Patch Set 12 : Added test suite for TextServicesContextMenu #

Total comments: 30

Patch Set 13 : Addressed comments #

Patch Set 14 : At->For #

Patch Set 15 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1168 lines, -411 lines) Patch
M chrome/app/chrome_command_ids.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -27 lines 0 comments Download
M chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +20 lines, -23 lines 0 comments Download
M chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +75 lines, -151 lines 0 comments Download
M chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +6 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +11 lines, -41 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -6 lines 0 comments Download
M content/public/browser/render_widget_host_view.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -7 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -3 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -11 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download
A ui/base/cocoa/text_services_context_menu.h View 1 2 3 4 5 6 7 8 11 1 chunk +70 lines, -0 lines 0 comments Download
A ui/base/cocoa/text_services_context_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +152 lines, -0 lines 0 comments Download
A ui/base/cocoa/text_services_context_menu_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +213 lines, -0 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
A ui/gfx/decorated_text_mac.h View 1 2 3 4 5 6 7 8 1 chunk +22 lines, -0 lines 0 comments Download
A ui/gfx/decorated_text_mac.mm View 1 2 3 4 5 6 7 8 1 chunk +51 lines, -0 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -4 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +15 lines, -4 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +104 lines, -27 lines 0 comments Download
M ui/strings/ui_strings.grd View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download
M ui/views/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -38 lines 0 comments Download
M ui/views/controls/label.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -3 lines 0 comments Download
M ui/views/controls/label.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +20 lines, -5 lines 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 6 3 chunks +8 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 8 6 chunks +39 lines, -5 lines 0 comments Download
M ui/views/controls/textfield/textfield_test_api.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +76 lines, -8 lines 0 comments Download
A ui/views/controls/views_text_services_context_menu.h View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
A ui/views/controls/views_text_services_context_menu.cc View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -0 lines 0 comments Download
A ui/views/controls/views_text_services_context_menu_mac.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +135 lines, -0 lines 0 comments Download
M ui/views/word_lookup_client.h View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -4 lines 0 comments Download

Messages

Total messages: 229 (185 generated)
tapted
this direction looks pretty good! left some suggestions https://codereview.chromium.org/2164483006/diff/140001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h (right): https://codereview.chromium.org/2164483006/diff/140001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h#newcode21 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h:21: TextContextMenu::Delegate ...
4 years, 5 months ago (2016-07-22 03:06:43 UTC) #5
spqchan
PTAL Haha sorry it took so long. It was a bit tricky to go through ...
4 years ago (2016-12-12 19:32:28 UTC) #15
spqchan
Ah snap, forgot to add a views_text_services_context_menu.cc file. Going to upload a patch with the ...
4 years ago (2016-12-12 22:12:32 UTC) #20
tapted
haven't dived in yet, but just answering question https://codereview.chromium.org/2164483006/diff/140001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2164483006/diff/140001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode3319 content/browser/renderer_host/render_widget_host_view_mac.mm:3319: - ...
4 years ago (2016-12-12 22:32:44 UTC) #21
tapted
Make sure there's a BUG= Needs a few tests too -- the writing direction checked/not-checked ...
4 years ago (2016-12-13 05:11:24 UTC) #22
spqchan
PTAL https://codereview.chromium.org/2164483006/diff/440001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm (right): https://codereview.chromium.org/2164483006/diff/440001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm#newcode247 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm:247: switch (command_id) { On 2016/12/13 05:11:22, tapted wrote: ...
4 years ago (2016-12-15 23:29:02 UTC) #52
tapted
(review still in progress, but I gotta run for now) https://codereview.chromium.org/2164483006/diff/440001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm (right): https://codereview.chromium.org/2164483006/diff/440001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm#newcode296 ...
4 years ago (2016-12-16 07:01:20 UTC) #56
spqchan
Take your time :) I made changes according to what you put out so far ...
4 years ago (2016-12-17 00:34:21 UTC) #57
tapted
aw man this is tough. We can't depend on src/chrome from src/u There' doesn't seem ...
4 years ago (2016-12-19 07:41:21 UTC) #58
spqchan
PTAL https://codereview.chromium.org/2164483006/diff/600001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/2164483006/diff/600001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode3392 content/browser/renderer_host/render_widget_host_view_mac.mm:3392: base::scoped_nsobject<NSString> text(SysUTF16ToNSString(str)); On 2016/12/19 07:41:21, tapted wrote: > ...
4 years ago (2016-12-21 01:03:02 UTC) #59
tapted
https://codereview.chromium.org/2164483006/diff/660001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm (right): https://codereview.chromium.org/2164483006/diff/660001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm#newcode248 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.mm:248: if (text_services_context_menu_.IsTextServicesCommandId(command_id)) I think this isn't needed now (text ...
4 years ago (2016-12-21 11:20:28 UTC) #60
spqchan
I made some changes according to your review and is heading out for the holiday. ...
4 years ago (2016-12-21 22:00:14 UTC) #63
spqchan
I made some changes according to your review and is heading out for the holiday. ...
4 years ago (2016-12-21 22:00:18 UTC) #64
tapted
Have a great holiday! Yeah no rush - I'm away until Jan 3rd. https://codereview.chromium.org/2164483006/diff/660001/ui/base/cocoa/text_services_context_menu.cc File ...
4 years ago (2016-12-21 22:13:16 UTC) #67
spqchan
Rebased and fixed the tests. PTAL thanks :) https://codereview.chromium.org/2164483006/diff/660001/ui/base/cocoa/text_services_context_menu.cc File ui/base/cocoa/text_services_context_menu.cc (right): https://codereview.chromium.org/2164483006/diff/660001/ui/base/cocoa/text_services_context_menu.cc#newcode20 ui/base/cocoa/text_services_context_menu.cc:20: SpeechChannel ...
3 years, 11 months ago (2017-01-13 20:13:20 UTC) #102
tapted
basically lg - worth looping in some OWNERS. Probably avi for the src/content stuff, and ...
3 years, 11 months ago (2017-01-13 21:37:33 UTC) #103
spqchan
Thanks! Addressed your comments. It looks like avi is OOO until February + msw Please ...
3 years, 11 months ago (2017-01-26 18:27:01 UTC) #113
msw
mostly minor comments https://codereview.chromium.org/2164483006/diff/890001/ui/gfx/decorated_text_mac.h File ui/gfx/decorated_text_mac.h (right): https://codereview.chromium.org/2164483006/diff/890001/ui/gfx/decorated_text_mac.h#newcode16 ui/gfx/decorated_text_mac.h:16: // Returns a NSAttributedString from |decorated_text|. ...
3 years, 11 months ago (2017-01-26 20:59:16 UTC) #114
nasko
content/ changes seem mostly moving code around. I do have one question though. https://codereview.chromium.org/2164483006/diff/950001/content/browser/frame_host/render_widget_host_view_guest.cc File ...
3 years, 10 months ago (2017-01-31 15:37:29 UTC) #123
spqchan
PTAL, I added a test and addressed the comments from msw and nasko https://codereview.chromium.org/2164483006/diff/890001/ui/gfx/decorated_text_mac.h File ...
3 years, 10 months ago (2017-02-01 00:32:39 UTC) #130
msw
In the future, you may find it helpful (and some reviewers will too), if you ...
3 years, 10 months ago (2017-02-01 01:52:29 UTC) #133
Alexei Svitkine (slow)
https://codereview.chromium.org/2164483006/diff/970001/content/browser/renderer_host/render_widget_host_view_mac.h File content/browser/renderer_host/render_widget_host_view_mac.h (right): https://codereview.chromium.org/2164483006/diff/970001/content/browser/renderer_host/render_widget_host_view_mac.h#newcode485 content/browser/renderer_host/render_widget_host_view_mac.h:485: // TODO(spqchan): Change |text| to be the type string16. ...
3 years, 10 months ago (2017-02-01 19:12:38 UTC) #170
spqchan
msw@, thanks of the heads up. I deleted the extra patches :) Addressed the comments ...
3 years, 10 months ago (2017-02-02 20:35:06 UTC) #181
Alexei Svitkine (slow)
https://codereview.chromium.org/2164483006/diff/970001/content/browser/renderer_host/render_widget_host_view_mac.h File content/browser/renderer_host/render_widget_host_view_mac.h (right): https://codereview.chromium.org/2164483006/diff/970001/content/browser/renderer_host/render_widget_host_view_mac.h#newcode485 content/browser/renderer_host/render_widget_host_view_mac.h:485: // TODO(spqchan): Change |text| to be the type string16. ...
3 years, 10 months ago (2017-02-02 20:50:24 UTC) #182
msw
https://codereview.chromium.org/2164483006/diff/950001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2164483006/diff/950001/ui/gfx/render_text_unittest.cc#newcode4021 ui/gfx/render_text_unittest.cc:4021: for (size_t i = 0; i < expected_text_1.text.length(); i++) ...
3 years, 10 months ago (2017-02-02 22:16:08 UTC) #183
tapted
lgtm - mostly just nits and a few thoughts https://codereview.chromium.org/2164483006/diff/1050001/content/browser/renderer_host/render_widget_host_view_mac.h File content/browser/renderer_host/render_widget_host_view_mac.h (right): https://codereview.chromium.org/2164483006/diff/1050001/content/browser/renderer_host/render_widget_host_view_mac.h#newcode518 content/browser/renderer_host/render_widget_host_view_mac.h:518: ...
3 years, 10 months ago (2017-02-03 10:14:51 UTC) #184
Alexei Svitkine (slow)
lgtm % comments https://codereview.chromium.org/2164483006/diff/1050001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h (right): https://codereview.chromium.org/2164483006/diff/1050001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h#newcode62 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h:62: // Helper method that returns the ...
3 years, 10 months ago (2017-02-03 15:43:28 UTC) #185
Alexei Svitkine (slow)
lgtm % comments https://codereview.chromium.org/2164483006/diff/1050001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h File chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h (right): https://codereview.chromium.org/2164483006/diff/1050001/chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h#newcode62 chrome/browser/ui/cocoa/renderer_context_menu/render_view_context_menu_mac.h:62: // Helper method that returns the ...
3 years, 10 months ago (2017-02-03 15:43:34 UTC) #186
spqchan
PTAL, addressed all of the comments. Let me know if I missed any, thanks! https://codereview.chromium.org/2164483006/diff/970001/content/browser/renderer_host/render_widget_host_view_mac.h ...
3 years, 10 months ago (2017-02-03 23:32:11 UTC) #198
msw
lgtm with 'At' -> 'For' comment addressed. https://codereview.chromium.org/2164483006/diff/1030001/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/2164483006/diff/1030001/ui/gfx/render_text_unittest.cc#newcode4001 ui/gfx/render_text_unittest.cc:4001: // Verify ...
3 years, 10 months ago (2017-02-03 23:38:35 UTC) #199
spqchan
On 2017/02/03 23:38:35, msw wrote: > lgtm with 'At' -> 'For' comment addressed. > > ...
3 years, 10 months ago (2017-02-04 00:02:29 UTC) #202
nasko
Rubberstamp LGTM on content/ bits.
3 years, 10 months ago (2017-02-06 19:23:15 UTC) #205
spqchan
On 2017/02/06 19:23:15, nasko (very slow) wrote: > Rubberstamp LGTM on content/ bits. thanks!
3 years, 10 months ago (2017-02-06 19:37:11 UTC) #206
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/2164483006/1110001
3 years, 10 months ago (2017-02-06 19:40:20 UTC) #209
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/357671)
3 years, 10 months ago (2017-02-06 19:48:32 UTC) #211
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/2164483006/1110001
3 years, 10 months ago (2017-02-06 22:06:43 UTC) #213
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/357869)
3 years, 10 months ago (2017-02-06 22:19:13 UTC) #215
spqchan
+sky for chrome/app/chrome_command_ids.h ownership
3 years, 10 months ago (2017-02-06 22:32:42 UTC) #217
sky
LGTM
3 years, 10 months ago (2017-02-07 00:00:12 UTC) #218
spqchan
On 2017/02/07 00:00:12, sky wrote: > LGTM thanks!
3 years, 10 months ago (2017-02-07 00:00:52 UTC) #219
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/2164483006/1110001
3 years, 10 months ago (2017-02-07 00:03:05 UTC) #221
commit-bot: I haz the power
Failed to apply patch for content/browser/frame_host/render_widget_host_view_child_frame.h: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-07 00:10:26 UTC) #223
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/2164483006/1130001
3 years, 10 months ago (2017-02-07 01:04:35 UTC) #226
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 02:42:43 UTC) #229
Message was sent while issue was closed.
Committed patchset #15 (id:1130001) as
https://chromium.googlesource.com/chromium/src/+/375ddabe9cdc45673e112c5b1b06...

Powered by Google App Engine
This is Rietveld 408576698