New issue
Advanced search Search tips

Issue 833673 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Keyboard Shortcuts Viewer: Remove the aura::Window* parameter from keyboard_shortcut_viewer::KeyboardShortcutView::Show

Project Member Reported by wutao@chromium.org, Apr 17 2018

Issue description

ToT 68.0.3398.0

We want to open the KSV window at the display where the user last activated a window.
In the meantime to reduce dependencies, we want to remove the aura::Window* parameter from keyboard_shortcut_viewer::KeyboardShortcutView::Show(gfx::NativeWindow context).


 
We could use display::Screen to get screen bounds for centering.

However, we don't yet have the concept of display-for-new-windows, so we might need to build that. Or we could just always show KSV on the primary display (which is what the keyboard overlay did).

Components: Internals>Services>Ash
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 17 2018

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

commit 2bb4e5b139d6b1c78e22f15d3177d7972b90f4e3
Author: wutao <wutao@chromium.org>
Date: Tue Apr 17 15:55:38 2018

cros: Add TODO to remove deps for Shortcuts Viewer

This cl adds TODO to remove the dependency on aura::Window in Keyboard
Shortcuts Viewer. In addition, this cl removes unused deps and include.

Bug:  833673 
Test: Manual
Change-Id: Icc4fd0726cace1971674e371bb5053b20575933b
Reviewed-on: https://chromium-review.googlesource.com/1014663
Reviewed-by: James Cook <jamescook@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551348}
[modify] https://crrev.com/2bb4e5b139d6b1c78e22f15d3177d7972b90f4e3/chrome/browser/ui/ash/ksv/DEPS
[modify] https://crrev.com/2bb4e5b139d6b1c78e22f15d3177d7972b90f4e3/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_util.cc

Cc: -jamescook@chromium.org wutao@chromium.org
Labels: Proj-Mustash
Owner: jamescook@chromium.org
Status: Started (was: Available)
I have a CL that fixes this.

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/+/43e5034df2e87fe2dd959aa2c23e795246711d3a

commit 43e5034df2e87fe2dd959aa2c23e795246711d3a
Author: James Cook <jamescook@chromium.org>
Date: Fri Jun 01 20:51:17 2018

chromeos: Make shortcut_viewer app appear on correct display

The mojo app version of shortcut_viewer can't use an aura::Window to
provide context to choose a display. Instead, provide neither context
nor a parent, which makes ash place the window on the display for new
windows. Don't provide bounds (since that would force the window to
a particular display). Instead, provide a preferred size.

This requires fixes to native widget initialization to make sure
the default aura::Window context (which is RootWindowForNewWindows)
provides the correct default display when there is no parent.

The test for this live in ash_unittests because I didn't want to add
an ash/shell.h dependency to keyboard_shortcut_viewer.

TBR=sky@chromium.org

Bug:  847982 ,  833673 ,  841020 
Test: added
Change-Id: Id3179d1c4d9b39911aded19fe171491f479fe4db
Reviewed-on: https://chromium-review.googlesource.com/1081174
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563786}
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/shortcut_viewer_application.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/views/keyboard_shortcut_view.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/views/keyboard_shortcut_view.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/components/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/shell_unittest.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/container_finder.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/container_finder.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/non_client_frame_controller.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/root_window_finder.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/root_window_finder.h
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ash/wm/top_level_window_factory.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/chrome/browser/ui/ash/ksv/DEPS
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/chrome/browser/ui/ash/ksv/keyboard_shortcut_viewer_util.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ui/aura/mus/window_tree_host_mus_init_params.cc
[modify] https://crrev.com/43e5034df2e87fe2dd959aa2c23e795246711d3a/ui/views/widget/native_widget_aura.cc

Status: Fixed (was: Started)

Sign in to add a comment