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

Issue 2061183002: arc: IPC method to set custom wallpaper. (Closed)

Created:
4 years, 6 months ago by Shuhei Takahashi
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blundell+watchlist_chromium.org, chromium-reviews, darin (slow to review), davemoore+watch_chromium.org, droger+watchlist_chromium.org, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, oshima+watch_chromium.org, qsr+mojo_chromium.org, sdefresne+watchlist_chromium.org, viettrungluu+watch_chromium.org, yusukes+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: IPC method to set custom wallpaper. A new IPC method SetWallpaper() is added to allow apps to set custom wallpaper. Notes: - The IPC method accepts JPEG data only for now because Chrome OS Wallpaper Manager re-encodes any custom wallpaper image to JPEG anyway. - New wallpaper image does not show up in Chrome OS wallpaper picker, just similarly as when the wallpaper is set by enterprise policy. This is good enough for first version and it is a TODO to register the new wallpaper to picker. - STRETCH layout is always used to render the wallpaper for now. We need UI discussion when we allow the user to select the layout later. BUG=chromium:618922 TEST=Manually tested with Android change that SetWallpaper() IPC call changes the wallpaper successfully. Committed: https://crrev.com/fc1bf374333bb1d9bd0d64971e64eb6f3e604292 Cr-Commit-Position: refs/heads/master@{#400399}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Review ready. #

Total comments: 8

Patch Set 4 : Address hidehiko's comment. #

Total comments: 4

Patch Set 5 : Address hidehiko's comment. #

Patch Set 6 : Add next IDs. #

Total comments: 12

Patch Set 7 : Address comments. #

Patch Set 8 : Tiny style fix. #

Total comments: 10

Patch Set 9 : Address yusukes' comments. #

Total comments: 12

Patch Set 10 : Addressed hidehiko's comment. #

Patch Set 11 : Small amend. #

Patch Set 12 : Small amend. #

Total comments: 10

Patch Set 13 : Rebased. #

Patch Set 14 : Address hidehiko's comments. #

Total comments: 2

Patch Set 15 : Remove redundant crot. #

Patch Set 16 : Style fix. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -26 lines) Patch
M chrome/browser/chromeos/arc/arc_service_launcher.cc View 1 2 3 4 5 6 2 chunks +20 lines, -15 lines 0 comments Download
A chrome/browser/chromeos/arc/arc_wallpaper_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/arc/arc_wallpaper_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +117 lines, -0 lines 2 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M components/arc.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/arc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/arc/arc_service_manager.cc View 1 2 3 4 3 chunks +2 lines, -5 lines 0 comments Download
M components/arc/common/intent_helper.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -2 lines 0 comments Download
M components/arc/intent_helper/arc_intent_helper_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +10 lines, -2 lines 0 comments Download
M components/arc/intent_helper/arc_intent_helper_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +22 lines, -2 lines 0 comments Download
A components/arc/set_wallpaper_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (13 generated)
Shuhei Takahashi
hidehiko: PTAL for all xdai: PTAL for arc_wallpaper_handler.cc which calls WallpaperManager. dcheng: PTAL for .mojom ...
4 years, 6 months ago (2016-06-14 13:24:48 UTC) #4
Shuhei Takahashi
FYI, WIP corresponding changes are ag/1135701, ag/1135563.
4 years, 6 months ago (2016-06-14 13:27:35 UTC) #5
hidehiko
Quick walk through to shorten the total review period. Will take a look in details. ...
4 years, 6 months ago (2016-06-14 13:44:17 UTC) #6
Shuhei Takahashi
hidehiko, thanks for quick review! BTW, I removed dependency to //content/public so approval for DEPS ...
4 years, 6 months ago (2016-06-14 14:08:40 UTC) #8
hidehiko
components/arc LGTM. Defer to other reviewers.
4 years, 6 months ago (2016-06-15 08:58:43 UTC) #9
hidehiko
Oops, two small things overlooked. https://codereview.chromium.org/2061183002/diff/60001/components/arc/BUILD.gn File components/arc/BUILD.gn (right): https://codereview.chromium.org/2061183002/diff/60001/components/arc/BUILD.gn#newcode10 components/arc/BUILD.gn:10: "arc_bridge_bootstrap.cc", Please add set_wallpaper_delegate.h ...
4 years, 6 months ago (2016-06-15 09:04:17 UTC) #10
Shuhei Takahashi
https://codereview.chromium.org/2061183002/diff/60001/components/arc/BUILD.gn File components/arc/BUILD.gn (right): https://codereview.chromium.org/2061183002/diff/60001/components/arc/BUILD.gn#newcode10 components/arc/BUILD.gn:10: "arc_bridge_bootstrap.cc", On 2016/06/15 09:04:16, hidehiko wrote: > Please add ...
4 years, 6 months ago (2016-06-15 09:14:05 UTC) #11
Shuhei Takahashi
hidehiko: PTAL for additional mojom comment xdai: PTAL for arc_wallpaper_handler.cc which calls WallpaperManager dcheng: PTAL ...
4 years, 6 months ago (2016-06-15 13:30:21 UTC) #12
Yusuke Sato
drive-by https://codereview.chromium.org/2061183002/diff/100001/components/arc/intent_helper/arc_intent_helper_bridge.cc File components/arc/intent_helper/arc_intent_helper_bridge.cc (right): https://codereview.chromium.org/2061183002/diff/100001/components/arc/intent_helper/arc_intent_helper_bridge.cc#newcode30 components/arc/intent_helper/arc_intent_helper_bridge.cc:30: std::unique_ptr<SkBitmap> bitmap = gfx::JPEGCodec::Decode( qq: Is it safe/allowed ...
4 years, 6 months ago (2016-06-15 16:12:49 UTC) #14
xdai1
arc_wallpaper_handler.cc & arc/arc_wallpaper_handler.h lgtm https://codereview.chromium.org/2061183002/diff/100001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/100001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode45 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:45: // it might be quite ...
4 years, 6 months ago (2016-06-15 16:30:14 UTC) #15
Yusuke Sato
https://codereview.chromium.org/2061183002/diff/100001/chrome/browser/chromeos/arc/arc_service_launcher.cc File chrome/browser/chromeos/arc/arc_service_launcher.cc (right): https://codereview.chromium.org/2061183002/diff/100001/chrome/browser/chromeos/arc/arc_service_launcher.cc#newcode36 chrome/browser/chromeos/arc/arc_service_launcher.cc:36: base::WrapUnique(new ArcWallpaperHandler())))); MakeUnique? (here and elsewhere). base/memory/ptr_util.h: // MakeUnique<T>(args) ...
4 years, 6 months ago (2016-06-15 16:45:01 UTC) #16
Shuhei Takahashi
hidehiko: PTAL yusukes: PTAL dcheng: PTAL for mojom changes xdai, thanks for reviewing! New patch ...
4 years, 6 months ago (2016-06-15 18:14:37 UTC) #17
Shuhei Takahashi
hidehiko: PTAL yusukes: PTAL dcheng: PTAL for mojom changes xdai, thanks for reviewing! New patch ...
4 years, 6 months ago (2016-06-15 18:14:38 UTC) #18
Yusuke Sato
Thanks for the fix. LGTM with nits, comments and questions. Defer to dcheng@. https://codereview.chromium.org/2061183002/diff/140001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File ...
4 years, 6 months ago (2016-06-15 19:44:32 UTC) #19
Shuhei Takahashi
hidehiko: PTAL dcheng: PTAL for mojom changes yusukes, thanks for reviewing! https://codereview.chromium.org/2061183002/diff/140001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): ...
4 years, 6 months ago (2016-06-15 22:58:39 UTC) #20
rickyz (no longer on Chrome)
mojom lgtm, thanks for all the cleanups! https://codereview.chromium.org/2061183002/diff/160001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/160001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode31 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:31: // ImageSkia ...
4 years, 6 months ago (2016-06-16 01:38:48 UTC) #22
hidehiko
https://codereview.chromium.org/2061183002/diff/160001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/160001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode28 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:28: class UnsafeJpegImageDecoder : public ImageDecoder::ImageRequest { This looks just ...
4 years, 6 months ago (2016-06-16 05:49:25 UTC) #23
Shuhei Takahashi
hidehiko: PTAL https://codereview.chromium.org/2061183002/diff/160001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/160001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode28 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:28: class UnsafeJpegImageDecoder : public ImageDecoder::ImageRequest { On ...
4 years, 6 months ago (2016-06-16 14:56:11 UTC) #24
hidehiko
https://codereview.chromium.org/2061183002/diff/220001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/220001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode78 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:78: ArcWallpaperHandler::~ArcWallpaperHandler() { Optional: can we have ThreadChecker in this ...
4 years, 6 months ago (2016-06-16 20:31:53 UTC) #25
Shuhei Takahashi
hidehiko: PTAL Rebased to rebase mojom conflict. https://codereview.chromium.org/2061183002/diff/220001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/220001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode78 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:78: ArcWallpaperHandler::~ArcWallpaperHandler() { ...
4 years, 6 months ago (2016-06-17 02:12:49 UTC) #26
hidehiko
LGTM! https://codereview.chromium.org/2061183002/diff/260001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/260001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode79 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:79: DCHECK(thread_checker_.CalledOnValidThread()); Redundant. (ThreadChecker checks if it is called ...
4 years, 6 months ago (2016-06-17 02:16:56 UTC) #27
Shuhei Takahashi
Thanks for reviewing! https://codereview.chromium.org/2061183002/diff/260001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/260001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode79 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:79: DCHECK(thread_checker_.CalledOnValidThread()); On 2016/06/17 02:16:56, hidehiko wrote: ...
4 years, 6 months ago (2016-06-17 02:39:46 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2061183002/280001
4 years, 6 months ago (2016-06-17 02:40:30 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/217589)
4 years, 6 months ago (2016-06-17 02:59:07 UTC) #33
Shuhei Takahashi
Updated the patch with style fix.
4 years, 6 months ago (2016-06-17 07:17:45 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2061183002/300001
4 years, 6 months ago (2016-06-17 07:18:13 UTC) #37
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 6 months ago (2016-06-17 08:27:50 UTC) #39
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/fc1bf374333bb1d9bd0d64971e64eb6f3e604292 Cr-Commit-Position: refs/heads/master@{#400399}
4 years, 6 months ago (2016-06-17 08:29:22 UTC) #41
dcheng
https://codereview.chromium.org/2061183002/diff/300001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right): https://codereview.chromium.org/2061183002/diff/300001/chrome/browser/chromeos/arc/arc_wallpaper_handler.cc#newcode106 chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:106: delete request; Just curious, but do we really need ...
4 years, 6 months ago (2016-06-17 13:23:27 UTC) #42
Shuhei Takahashi
4 years, 6 months ago (2016-06-20 12:10:30 UTC) #43
Message was sent while issue was closed.
https://codereview.chromium.org/2061183002/diff/300001/chrome/browser/chromeo...
File chrome/browser/chromeos/arc/arc_wallpaper_handler.cc (right):

https://codereview.chromium.org/2061183002/diff/300001/chrome/browser/chromeo...
chrome/browser/chromeos/arc/arc_wallpaper_handler.cc:106: delete request;
On 2016/06/17 13:23:27, dcheng wrote:
> Just curious, but do we really need to handle multiple in-flight requests? I
> think we can just remember one and Cancel() the previous? Then we don't need
the
> container at all.

You're right. That sounds better. Let me address it in another patch.

Powered by Google App Engine
This is Rietveld 408576698