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

Issue 1746013002: Hide/show widget on Windows screen lock/unlock

Created:
4 years, 9 months ago by aleksandar.stojiljkovic
Modified:
4 years, 9 months ago
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Hide/show widget on Windows screen lock/unlock to mimic behavior on other platforms (Mac,Android). Initial intention behind patch was to fix missing Page Visibility API visibilitychange on Windows screen lock/unlock in example: e.g. http://daniemon.com/tech/webapps/page-visibility/ Debugging showed that the problem is in NativeViewHostWrapper's HideWidget -> NativeView::Hide() not getting called. One of the related things was also missing call to Document::didChangeVisibilityState. Some OSs (e.g. Windows and Linux) don't mark windows as hidden on screen lock or when other opaque windows fully cover them. Note that e.g. OSX and Android do this while Windows and Linux don't. OnSoftVisibilityChanged enables that OS HWND window state is kept as is (on Linux and Windows) and that e.g. widget is hidden and power saving PageVisibility API is still properly triggered. The (first) patch here targets Windows and screen lock - Linux support and occlusion left for follow up patches. BUG=532128

Patch Set 1 #

Patch Set 2 : Nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -1 line) Patch
M ui/views/controls/native/native_view_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/native/native_view_host.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download
M ui/views/view.h View 2 chunks +4 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_delegate.h View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/views/widget/widget.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/widget.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 chunk +7 lines, -1 line 0 comments Download
M ui/views/win/hwnd_message_handler_delegate.h View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (6 generated)
aleksandar.stojiljkovic
4 years, 9 months ago (2016-02-29 13:51:13 UTC) #2
tfarina
Could you reword your subject line a bit? To say what is being changed here? ...
4 years, 9 months ago (2016-02-29 15:09:04 UTC) #3
aleksandar.stojiljkovic
On 2016/02/29 15:09:04, tfarina wrote: > Could you reword your subject line a bit? To ...
4 years, 9 months ago (2016-02-29 16:56:24 UTC) #5
sky
I think you're duplicating what we have in ui/base/idle. That interface is currently polling based. ...
4 years, 9 months ago (2016-02-29 16:58:19 UTC) #6
aleksandar.stojiljkovic
On 2016/02/29 16:58:19, sky wrote: > I think you're duplicating what we have in ui/base/idle. ...
4 years, 9 months ago (2016-02-29 17:06:35 UTC) #7
aleksandar.stojiljkovic
On 2016/02/29 16:58:19, sky wrote: > I think you're duplicating what we have in ui/base/idle. ...
4 years, 9 months ago (2016-02-29 18:55:53 UTC) #8
aleksandar.stojiljkovic
Including ananta@ too.
4 years, 9 months ago (2016-02-29 20:00:52 UTC) #10
sky
Have you run this by anyone on the web side of things to make sure ...
4 years, 9 months ago (2016-02-29 21:04:20 UTC) #11
aleksandar.stojiljkovic
On 2016/02/29 21:04:20, sky wrote: > Have you run this by anyone on the web ...
4 years, 9 months ago (2016-02-29 21:38:50 UTC) #13
aleksandar.stojiljkovic
ccameron@, We are trying to evaluate a need for this patch and approach, hope you ...
4 years, 9 months ago (2016-02-29 21:47:47 UTC) #15
aleksandar.stojiljkovic
On 2016/02/29 21:04:20, sky wrote: > Have you run this by anyone on the web ...
4 years, 9 months ago (2016-03-01 17:49:07 UTC) #17
davidben
On 2016/03/01 17:49:07, aleksandar.stojiljkovic wrote: > On 2016/02/29 21:04:20, sky wrote: > > Have you ...
4 years, 9 months ago (2016-03-01 18:20:24 UTC) #18
nduca
I think this sounds "Correct" wrt web platform behavior. I'd suggest pinging a few people ...
4 years, 9 months ago (2016-03-04 18:29:41 UTC) #19
igrigorik
On 2016/03/04 18:29:41, nduca wrote: > I think this sounds "Correct" wrt web platform behavior. ...
4 years, 9 months ago (2016-03-04 21:45:12 UTC) #20
aleksandar.stojiljkovic
On 2016/02/29 21:04:20, sky wrote: > Have you run this by anyone on the web ...
4 years, 9 months ago (2016-03-07 17:40:50 UTC) #21
sky
On 2016/03/07 17:40:50, aleksandar.stojiljkovic wrote: > On 2016/02/29 21:04:20, sky wrote: > > Have you ...
4 years, 9 months ago (2016-03-07 18:51:45 UTC) #22
aleksandar.stojiljkovic
On 2016/03/07 18:51:45, sky wrote: > On 2016/03/07 17:40:50, aleksandar.stojiljkovic wrote: > > On 2016/02/29 ...
4 years, 9 months ago (2016-03-07 22:46:03 UTC) #23
sky
igrigorik@chromium.org earlier said: [1]: hidden if the operating system lock screen is shown. Which is ...
4 years, 9 months ago (2016-03-07 23:54:16 UTC) #24
aleksandar.stojiljkovic
On 2016/03/07 23:54:16, sky wrote: > mailto:igrigorik@chromium.org earlier said: > > [1]: hidden if the ...
4 years, 9 months ago (2016-03-08 09:43:14 UTC) #25
sky
It is still not clear to me what cases you are trying to handle. Please ...
4 years, 9 months ago (2016-03-08 17:09:37 UTC) #26
aleksandar.stojiljkovic
On 2016/03/08 17:09:37, sky wrote: > It is still not clear to me what cases ...
4 years, 9 months ago (2016-03-08 20:53:28 UTC) #27
sky
4 years, 9 months ago (2016-03-08 22:54:45 UTC) #28
Doing 1 and 2 now is fine by me. I question whether we want 3 and 4 at all.

That means we're back to the global api, not a per widget api. By
which I mean a way to determine when the system is locked or screen
saver is up that does not entail polling.

  -Scott

On Tue, Mar 8, 2016 at 12:53 PM,  <aleksandar.stojiljkovic@intel.com> wrote:
> On 2016/03/08 17:09:37, sky wrote:
>> It is still not clear to me what cases you are trying to handle.
>> Please clarify that. I propose we deal with lock screen, screen saver
>> and nothing else.
>
> In order of priority:
>
> 1) lock screen
> 2) screen saver
>
> Later and this is not trivial (multiple monitors, remote session...) and
> also
> with questionable benefit:
> 3) other processes going fullscreen - questionable benefit as user are used
> to
> shutting down browser on Windows before running games or playing movies.
> 4) monitors turn down (questionable if there is suc thing in API).
>
> So, for 1 and 2 - same notification can be used to start pulling timers for
> idle
> use cases (#8)?
>
>
>
> https://codereview.chromium.org/1746013002/

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698