New issue
Advanced search Search tips

Issue 818075 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 800945



Sign in to add a comment

Support preview for custom and online wallpapers on the new picker

Project Member Reported by wzang@chromium.org, Mar 2 2018

Issue description

On the new wallpaper picker, clicking on each thumbnail will start a 'full-screen' preview mode, and user will be able to choose to either confirm the choice (which automatically close the app), or cancel preview (which reverts back to whatever the previous wallpaper is).

A mock is at: https://goo.gl/pX54ph

There's no way for user to one-click set user wallpaper on the new picker. User has to go through the preview process.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5

commit 85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5
Author: Wenzhao Zang <wzang@chromium.org>
Date: Wed Mar 07 03:00:01 2018

cros: Support preview for custom wallpapers (Part I)

1) Didn't implement it using a dummy html background since we want to
   reuse code in WallpaperResizer.

2) The original idea was to create ShowPreviewWallpaper(imageSkia)
   and do not pass any other info to //ash until the user confirms the
   choice. But this approach requires lots of changes within
   wallpaper_private_api.cc. Instead, send all the info one-time and
   let //ash maintain the information until user either confirms or
   cancels the preview.

(Please see bug for the feature description.)

Screenshots:
https://goo.gl/p6KKF8

      and select an image under 'My photos'.

Bug:  818075 
Test: Turn on 'enable-new-wallpaper-picker' under chrome://flags,
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I86d2a82f0329bf0c357ee196301dcb0b1eef271f
Reviewed-on: https://chromium-review.googlesource.com/945075
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Oliver Chang <ochang@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541299}
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/accelerators/debug_commands.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/public/interfaces/wallpaper.mojom
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/wallpaper/wallpaper_controller.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/wallpaper/wallpaper_controller.h
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/wallpaper/wallpaper_controller_observer.h
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/wallpaper/wallpaper_controller_test_api.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/ash/wallpaper/wallpaper_controller_unittest.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/chromeos/extensions/wallpaper_api.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/chromeos/extensions/wallpaper_private_api.h
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/resources/chromeos/wallpaper_manager/css/wallpaper_manager.css
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/resources/chromeos/wallpaper_manager/main.html
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/ui/ash/test_wallpaper_controller.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/ui/ash/test_wallpaper_controller.h
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/ui/ash/wallpaper_controller_client.cc
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/browser/ui/ash/wallpaper_controller_client.h
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/common/extensions/api/wallpaper_private.json
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/test/data/chromeos/wallpaper_manager/unit_tests/api_mock.js
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/test/data/chromeos/wallpaper_manager/unit_tests/event_page_unittest.js
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/chrome/test/data/extensions/api_test/wallpaper_manager/test.js
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/85ff43370ffbe2fa3d3c2d7d4a64278d26de95d5/tools/metrics/histograms/enums.xml

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e6b186dec258ba6178468f4e4dc2f82b906a09d

commit 7e6b186dec258ba6178468f4e4dc2f82b906a09d
Author: Wenzhao Zang <wzang@chromium.org>
Date: Mon Mar 12 19:28:03 2018

cros: Support preview for online wallpapers

This is a follow-up to CL 945075. It uses the same logic to support
preview for online wallpapers.

Bug:  818075 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I17eaf9c554bacfee0b3075213e0936aa0f20c189
Reviewed-on: https://chromium-review.googlesource.com/949884
Reviewed-by: Emily Stark <estark@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Xiaoqian Dai (OOO 3-12) <xdai@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542565}
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/ash/public/interfaces/wallpaper.mojom
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/ash/wallpaper/wallpaper_controller.cc
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/ash/wallpaper/wallpaper_controller.h
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/ash/wallpaper/wallpaper_controller_unittest.cc
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/resources/chromeos/wallpaper_manager/js/event_page.js
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/ui/ash/test_wallpaper_controller.cc
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/ui/ash/test_wallpaper_controller.h
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/ui/ash/wallpaper_controller_client.cc
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/browser/ui/ash/wallpaper_controller_client.h
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/common/extensions/api/wallpaper_private.json
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/test/data/chromeos/wallpaper_manager/unit_tests/event_page_unittest.js
[modify] https://crrev.com/7e6b186dec258ba6178468f4e4dc2f82b906a09d/chrome/test/data/extensions/api_test/wallpaper_manager/test.js

Comment 3 by wzang@chromium.org, Apr 4 2018

Currently the preview wallpaper is blocked by the black backdrop in tablet mode.
Screenshot from 2018-04-04 15-14-58.png
25.8 KB View Download
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6088355323ac15ee243051f88f94b065a8f975c7

commit 6088355323ac15ee243051f88f94b065a8f975c7
Author: Wenzhao Zang <wzang@chromium.org>
Date: Wed Apr 11 02:26:13 2018

cros: Disable backdrop for wallpaper picker app in preview mode

The preview wallpaper is blocked by a black backdrop in tablet mode,
on the new wallpaper picker (see #3 of the bug).

There are basically two ways to disable it:

1) (Not used) Disable backdrop based on the extension id, but it
   requires creating a new field in |AppWindow::CreateParams|, and we
   may need to hard code the extension id in a "white list" or something
   similar.

2) (This CL) Notify backdrop controller when preview mode starts. The
   drawback of this approach is: backdrop controller has to assume that
   the active window is indeed the wallpaper picker (because it's not
   feasible to create an extension id <-> aura::Window map.) This should
   be OK because |wallpaper_window_state_manager| has been using active
   window as the wallpaper picker window for a long time.

Bug:  818075 
Test: --new-wallpaper-picker --force-tablet-mode=touch_view
Change-Id: I12420b7ee83df32913820bf85038e2278f3940ac
Reviewed-on: https://chromium-review.googlesource.com/932911
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549734}
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/public/cpp/window_properties.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/public/cpp/window_properties.h
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wallpaper/wallpaper_controller.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wallpaper/wallpaper_controller_observer.h
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wallpaper/wallpaper_controller_test_api.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wallpaper/wallpaper_controller_test_api.h
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wallpaper/wallpaper_controller_unittest.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wm/workspace/backdrop_controller.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wm/workspace/backdrop_controller.h
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wm/workspace/workspace_layout_manager.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ash/wm/workspace/workspace_layout_manager_unittest.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/components/exo/client_controlled_shell_surface.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ui/aura/client/aura_constants.cc
[modify] https://crrev.com/6088355323ac15ee243051f88f94b065a8f975c7/ui/aura/client/aura_constants.h

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/364d26e31866bda2d98f8800721f55b838afad3d

commit 364d26e31866bda2d98f8800721f55b838afad3d
Author: Wenzhao Zang <wzang@chromium.org>
Date: Fri Jun 01 20:24:34 2018

cros: Notify wallpaper picker of decoding failure

1) Online wallpaper decoding has been moved to //ash, so in case of
   decoding failure, //ash should notify the picker to display an error
   message.

2) On a side note, we should move custom wallpaper decoding to //ash
   as well, but it's not time-critical.

3) Also changed base::Bind to base::BindOnce if possible.

Bug:  818075 
Change-Id: I973a2bd3a6b0b68ce8aaa37b4adc973c59556859
Reviewed-on: https://chromium-review.googlesource.com/1080042
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563773}
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/ash/public/interfaces/wallpaper.mojom
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/ash/wallpaper/wallpaper_controller.cc
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/ash/wallpaper/wallpaper_controller.h
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/ash/wallpaper/wallpaper_controller_unittest.cc
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/chrome/browser/chromeos/extensions/wallpaper_private_api.h
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/chrome/browser/ui/ash/test_wallpaper_controller.cc
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/chrome/browser/ui/ash/test_wallpaper_controller.h
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/chrome/browser/ui/ash/wallpaper_controller_client.cc
[modify] https://crrev.com/364d26e31866bda2d98f8800721f55b838afad3d/chrome/browser/ui/ash/wallpaper_controller_client.h

Comment 6 by wzang@chromium.org, Jun 23 2018

Status: Fixed (was: Started)

Sign in to add a comment