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

Issue 2737893002: Mojoify the RequestThumbnailForContextNode IPC message and reply (Closed)

Created:
3 years, 9 months ago by watk
Modified:
3 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, ajwong+watch_chromium.org, Avi (use Gerrit), chromium-reviews, creis+watch_chromium.org, darin (slow to review), qsr+mojo_chromium.org, tibell, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojoify the RequestThumbnailForContextNode IPC message and reply Previously thumbnail requests for context nodes were done with two IPC messages: ChromeViewMsg_RequestThumbnailForContextNode & ChromeViewHostMsg_RequestThumbnailForContextNode_ACK. This CL introduces a new per-frame mojo interface, ThumbnailCapturer, that's exposed by the renderer to the browser. BUG=699368 TEST=existing browsertest, manually tested on linux, mac, android Review-Url: https://codereview.chromium.org/2737893002 Cr-Commit-Position: refs/heads/master@{#456632} Committed: https://chromium.googlesource.com/chromium/src/+/2c472009300a73512a5ace3543e2eec9e2cdd5d9

Patch Set 1 #

Total comments: 3

Patch Set 2 : Bind the callback to weak ptrs #

Total comments: 3

Patch Set 3 : Remove watcher; use ContextMenuWaiter #

Total comments: 6

Patch Set 4 : sammc's comments #

Patch Set 5 : rebase & pull out raw proxy for making calls #

Total comments: 4

Patch Set 6 : change swap() call and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -207 lines) Patch
M chrome/browser/chrome_content_renderer_manifest_overlay.json View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc View 1 2 3 7 chunks +36 lines, -90 lines 0 comments Download
M chrome/browser/ui/android/context_menu_helper.h View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/ui/android/context_menu_helper.cc View 1 2 3 4 5 chunks +20 lines, -13 lines 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.h View 1 2 3 5 chunks +8 lines, -18 lines 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.cc View 1 2 3 4 6 chunks +22 lines, -54 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 2 chunks +0 lines, -17 lines 0 comments Download
A chrome/common/thumbnail_capturer.mojom View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_frame_observer.h View 1 2 3 4 4 chunks +14 lines, -1 line 0 comments Download
M chrome/renderer/chrome_render_frame_observer.cc View 1 2 3 4 5 6 chunks +18 lines, -13 lines 0 comments Download

Messages

Total messages: 56 (36 generated)
watk
I'm sending this out a bit early for feedback on how idiomatic it is. I ...
3 years, 9 months ago (2017-03-08 03:48:51 UTC) #2
tibell
https://codereview.chromium.org/2737893002/diff/1/chrome/browser/ui/tab_contents/core_tab_helper.cc File chrome/browser/ui/tab_contents/core_tab_helper.cc (right): https://codereview.chromium.org/2737893002/diff/1/chrome/browser/ui/tab_contents/core_tab_helper.cc#newcode127 chrome/browser/ui/tab_contents/core_tab_helper.cc:127: thumbnail_capturers_.Add(base::WrapUnique(thumbnail_capturer)); On 2017/03/08 03:48:51, watk wrote: > WDYT about ...
3 years, 9 months ago (2017-03-08 04:19:49 UTC) #4
watk
Ok, updated to use weak pointers. It's pretty clean.. The only weird thing is that ...
3 years, 9 months ago (2017-03-09 00:49:30 UTC) #5
tibell
https://codereview.chromium.org/2737893002/diff/20001/chrome/browser/ui/android/context_menu_helper.cc File chrome/browser/ui/android/context_menu_helper.cc (right): https://codereview.chromium.org/2737893002/diff/20001/chrome/browser/ui/android/context_menu_helper.cc#newcode162 chrome/browser/ui/android/context_menu_helper.cc:162: base::Passed(&thumbnail_capturer))); This move is probably undefined behavior since you're ...
3 years, 9 months ago (2017-03-09 02:21:49 UTC) #10
watk
Thanks, the test was broken on mac so I modified it a little bit and ...
3 years, 9 months ago (2017-03-09 04:01:01 UTC) #15
tibell
lgtm
3 years, 9 months ago (2017-03-09 04:03:47 UTC) #17
Sam McNally
https://codereview.chromium.org/2737893002/diff/40001/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc File chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc (right): https://codereview.chromium.org/2737893002/diff/40001/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc#newcode656 chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc:656: auto callback = [](bool* response_received, base::RunLoop* run_loop, Pass in ...
3 years, 9 months ago (2017-03-09 04:17:14 UTC) #18
watk
Thanks, adding owners: dcheng@ PTAL at: chrome/browser/chrome_content_renderer_manifest_overlay.json chrome/common/render_messages.h chrome/common/thumbnail_capturer.mojom jam@ PTAL at everything as a ...
3 years, 9 months ago (2017-03-09 06:38:41 UTC) #21
watk
Oops, forgot to add reviewers. Please see the previous message.
3 years, 9 months ago (2017-03-09 06:39:39 UTC) #23
Sam McNally
lgtm
3 years, 9 months ago (2017-03-09 06:43:00 UTC) #27
jam
On 2017/03/09 06:38:41, watk wrote: > Thanks, adding owners: > > dcheng@ PTAL at: > ...
3 years, 9 months ago (2017-03-09 16:45:10 UTC) #30
watk
Ah, thought jam@ was a chrome/ owner. jochen@ PTAL
3 years, 9 months ago (2017-03-09 22:30:29 UTC) #32
jochen (gone - plz use gerrit)
lgtm
3 years, 9 months ago (2017-03-10 10:42:23 UTC) #33
watk
Oops, I was reading a new c++ standard to conclude that the "call member function ...
3 years, 9 months ago (2017-03-12 23:44:07 UTC) #34
dcheng
https://codereview.chromium.org/2737893002/diff/100001/chrome/browser/ui/android/context_menu_helper.cc File chrome/browser/ui/android/context_menu_helper.cc (right): https://codereview.chromium.org/2737893002/diff/100001/chrome/browser/ui/android/context_menu_helper.cc#newcode160 chrome/browser/ui/android/context_menu_helper.cc:160: // there's either a connection error or a response. ...
3 years, 9 months ago (2017-03-13 07:49:29 UTC) #39
watk
https://codereview.chromium.org/2737893002/diff/100001/chrome/browser/ui/android/context_menu_helper.cc File chrome/browser/ui/android/context_menu_helper.cc (right): https://codereview.chromium.org/2737893002/diff/100001/chrome/browser/ui/android/context_menu_helper.cc#newcode160 chrome/browser/ui/android/context_menu_helper.cc:160: // there's either a connection error or a response. ...
3 years, 9 months ago (2017-03-13 23:34:04 UTC) #40
dcheng
LGTM The pattern feels a bit odd... if this shows up more, maybe it's worth ...
3 years, 9 months ago (2017-03-14 05:16:44 UTC) #49
watk
On 2017/03/14 05:16:44, dcheng wrote: > LGTM > > The pattern feels a bit odd... ...
3 years, 9 months ago (2017-03-14 05:47:35 UTC) #50
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/2737893002/120001
3 years, 9 months ago (2017-03-14 05:48:08 UTC) #53
commit-bot: I haz the power
3 years, 9 months ago (2017-03-14 05:53:53 UTC) #56
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/2c472009300a73512a5ace3543e2...

Powered by Google App Engine
This is Rietveld 408576698