Skip to content

Commit

Permalink
capture_mode: Associate some TODOs with bug number.
Browse files Browse the repository at this point in the history
Bug: none
Test: none
Change-Id: I28a0739e54c36ee10f81fd5b59cd1cbdba0019d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2730848
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Auto-Submit: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#859862}
  • Loading branch information
Sammie Quon authored and Chromium LUCI CQ committed Mar 4, 2021
1 parent 7784af6 commit 478544e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ash/capture_mode/capture_mode_session_focus_cycler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ class CaptureModeSession;
// CaptureModeSessionFocusCycler handles the special focus transitions which
// happen between the capture session UI items. These include the capture bar
// buttons, the selection region UI and the capture button.
// TODO(sammiequon): The selection region UI are drawn directly on a layer. We
// simulate focus by drawing focus rings on the same layer, but this is not
// compatible with accessibility. Investigate using AxVirtualView or making the
// dots actual Views.
// TODO(crbug.com/1182456): The selection region UI are drawn directly on a
// layer. We simulate focus by drawing focus rings on the same layer, but this
// is not compatible with accessibility. Investigate using AxVirtualView or
// making the dots actual Views.
class ASH_EXPORT CaptureModeSessionFocusCycler : public views::WidgetObserver {
public:
// The different groups which can receive focus during a capture mode session.
// A group may have multiple items which can receive focus.
// TODO(sammiequon): Investigate removing the groups concept and having one
// flat list.
// TODO(crbug.com/1182456): Investigate removing the groups concept and having
// one flat list.
enum class FocusGroup {
kNone = 0,
// The buttons to select the capture type and source on the capture bar.
Expand Down Expand Up @@ -83,8 +83,8 @@ class ASH_EXPORT CaptureModeSessionFocusCycler : public views::WidgetObserver {
void ClickView();

private:
// TODO(sammiequon): This can result in multiple of these objects thinking
// they have focus if CaptureModeSessionFocusCycler does not call
// TODO(crbug.com/1182456): This can result in multiple of these objects
// thinking they have focus if CaptureModeSessionFocusCycler does not call
// PseudoFocus or PseudoBlur properly. Investigate if there is a better
// approach.
bool has_focus_ = false;
Expand Down
2 changes: 2 additions & 0 deletions ash/capture_mode/capture_mode_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ void ClickNotification(base::Optional<int> button_index) {

// Moves the mouse and updates the cursor's display manually to imitate what a
// real mouse move event does in shell.
// TODO(crbug.com/990589): Unit tests should be able to simulate mouse input
// without having to call |CursorManager::SetDisplay|.
void MoveMouseToAndUpdateCursorDisplay(
const gfx::Point& point,
ui::test::EventGenerator* event_generator) {
Expand Down
2 changes: 2 additions & 0 deletions ash/wm/toplevel_window_event_handler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ TEST_F(ToplevelWindowEventHandlerTest, DragSnappedWindowToExternalDisplay) {
// To determine the state, WindowWorkspaceResizer determines the display by
// checking the CursorManager for the correct display. EventGenerator does not
// update the display in the CursorManager, so we manually do it here.
// TODO(crbug.com/990589): Unit tests should be able to simulate mouse input
// without having to call |CursorManager::SetDisplay|.
const gfx::Point drag_location = gfx::Point(472, -462);
Shell::Get()->cursor_manager()->SetDisplay(
display::Screen::GetScreen()->GetDisplayNearestPoint(drag_location));
Expand Down

0 comments on commit 478544e

Please sign in to comment.