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

Issue 1935083003: gfx::Screen: Replace GetWindowUnderCursor() with IsWindowUnderCursor(). (Closed)

Created:
4 years, 7 months ago by Elliot Glaysher
Modified:
4 years, 7 months ago
Reviewers:
brettw, sky
CC:
chromium-reviews, extensions-reviews_chromium.org, anandc+watch-blimp_chromium.org, sadrul, sriramsr+watch-blimp_chromium.org, jennb, tfarina, lcwu+watch_chromium.org, maniscalco+watch-blimp_chromium.org, Dmitry Titov, dcheng, nyquist+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, jianli, halliwell+watch_chromium.org, chromium-apps-reviews_chromium.org, kalyank, dtrainor+watch-blimp_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gfx::Screen: Replace GetWindowUnderCursor() with IsWindowUnderCursor(). This changes the interface to prevent handing handles to arbitrary windows to Screen callers, as this is impossible in mus. Thankfully, all callers were using this method as a way to check whether the mouse cursor was within a specific window, which we can easily transform the current implementations to. BUG=602727 Committed: https://crrev.com/52ae866e32364d3463569cc9f896024d2889a7f7 Cr-Commit-Position: refs/heads/master@{#391273}

Patch Set 1 #

Patch Set 2 : compile fixes #

Total comments: 2

Patch Set 3 : Null checks #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -53 lines) Patch
M ash/display/screen_ash.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/display/screen_ash.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M blimp/engine/app/ui/blimp_screen.h View 1 chunk +1 line, -1 line 0 comments Download
M blimp/engine/app/ui/blimp_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/panels/panel_view.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chromecast/graphics/cast_screen.h View 1 chunk +1 line, -1 line 0 comments Download
M chromecast/graphics/cast_screen.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/api/system_display/system_display_apitest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M extensions/shell/browser/shell_screen.h View 1 chunk +1 line, -1 line 0 comments Download
M extensions/shell/browser/shell_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M headless/lib/browser/headless_screen.h View 1 chunk +1 line, -1 line 0 comments Download
M headless/lib/browser/headless_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/aura/test/test_screen.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/test/test_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/display/win/screen_win.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/display/win/screen_win.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/screen.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/screen_android.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/screen_ios.mm View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/screen_mac.mm View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/test/test_screen.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/test/test_screen.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M ui/views/mouse_watcher_view_host.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/mus/screen_mus.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/mus/screen_mus.cc View 1 2 2 chunks +7 lines, -3 lines 3 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
Elliot Glaysher
4 years, 7 months ago (2016-05-02 22:30:22 UTC) #3
sky
I tend to think you should allow null in the new function but always return ...
4 years, 7 months ago (2016-05-02 23:01:44 UTC) #4
Elliot Glaysher
Check null in two places, and check visibility too.
4 years, 7 months ago (2016-05-02 23:17:51 UTC) #5
sky
LGTM with the following https://codereview.chromium.org/1935083003/diff/40001/ui/views/mus/screen_mus.cc File ui/views/mus/screen_mus.cc (right): https://codereview.chromium.org/1935083003/diff/40001/ui/views/mus/screen_mus.cc#newcode181 ui/views/mus/screen_mus.cc:181: return window->IsVisible() && IsVisible->IsDrawn
4 years, 7 months ago (2016-05-02 23:59:37 UTC) #6
sky
LGTM https://codereview.chromium.org/1935083003/diff/40001/ui/views/mus/screen_mus.cc File ui/views/mus/screen_mus.cc (right): https://codereview.chromium.org/1935083003/diff/40001/ui/views/mus/screen_mus.cc#newcode181 ui/views/mus/screen_mus.cc:181: return window->IsVisible() && On 2016/05/02 23:59:37, sky wrote: ...
4 years, 7 months ago (2016-05-03 00:02:48 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1935083003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1935083003/40001
4 years, 7 months ago (2016-05-03 00:04:08 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/176428)
4 years, 7 months ago (2016-05-03 00:11:27 UTC) #11
Elliot Glaysher
+brettw for toplevel owners stamp https://codereview.chromium.org/1935083003/diff/40001/ui/views/mus/screen_mus.cc File ui/views/mus/screen_mus.cc (right): https://codereview.chromium.org/1935083003/diff/40001/ui/views/mus/screen_mus.cc#newcode181 ui/views/mus/screen_mus.cc:181: return window->IsVisible() && On ...
4 years, 7 months ago (2016-05-03 00:13:20 UTC) #13
brettw
lgtm
4 years, 7 months ago (2016-05-03 16:59:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1935083003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1935083003/40001
4 years, 7 months ago (2016-05-03 17:06:04 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-03 17:11:50 UTC) #18
commit-bot: I haz the power
4 years, 7 months ago (2016-05-03 17:13:54 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/52ae866e32364d3463569cc9f896024d2889a7f7
Cr-Commit-Position: refs/heads/master@{#391273}

Powered by Google App Engine
This is Rietveld 408576698