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

Issue 944763002: Make Page Visibility API work when the browser window is visible or not

Created:
5 years, 10 months ago by joone
Modified:
5 years, 8 months ago
CC:
chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, nasko+codewatch_chromium.org, nona+watch_chromium.org, penghuang+watch_chromium.org, piman+watch_chromium.org, sievers+watch_chromium.org, James Su, tdanderson+views_chromium.org, tfarina, yukishiino+watch_chromium.org, yusukes+watch_chromium.org, jdduke (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Page Visibility API work when the browser window is visible or not Currently, the Page Visibility API only works while switching between tabs, but we need to make it work when the browser window is minimized or hidden by switching between workspaces. This patch only works for Ubuntu Unity and does not work in the lock screen, which will be fixed in a separated patch. BUG=293128

Patch Set 1 #

Total comments: 2

Patch Set 2 : remove the VisibilityNotify event handler #

Total comments: 7

Patch Set 3 : Updated comment and fixed the style #

Patch Set 4 : use of SetWindowVisibility message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -15 lines) Patch
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M content/public/browser/render_widget_host_view.h View 1 2 3 1 chunk +4 lines, -7 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 chunks +9 lines, -2 lines 0 comments Download
M ui/aura/window_tree_host.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/window_tree_host.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/window_tree_host_observer.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 3 1 chunk +14 lines, -1 line 0 comments Download

Messages

Total messages: 28 (4 generated)
joone
Hi Jochen, Could you review my patch? I made a little bit of change to ...
5 years, 10 months ago (2015-02-20 03:00:38 UTC) #2
jochen (gone - plz use gerrit)
is it possible to add tests for this? I don't know enough about unity to ...
5 years, 10 months ago (2015-02-23 12:11:25 UTC) #4
Elliot Glaysher
On 2015/02/23 12:11:25, jochen (slow) wrote: > is it possible to add tests for this? ...
5 years, 10 months ago (2015-02-23 18:30:34 UTC) #5
sadrul
https://codereview.chromium.org/944763002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/944763002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1253 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1253: bool is_minimized = IsMinimized(); Can this be fixed/made cleverer ...
5 years, 10 months ago (2015-02-23 21:43:33 UTC) #7
joone
On 2015/02/23 18:30:34, Elliot Glaysher wrote: > On 2015/02/23 12:11:25, jochen (slow) wrote: > > ...
5 years, 10 months ago (2015-02-23 21:53:45 UTC) #8
joone
On 2015/02/23 12:11:25, jochen (slow) wrote: > is it possible to add tests for this? ...
5 years, 10 months ago (2015-02-23 22:06:45 UTC) #9
joone
https://codereview.chromium.org/944763002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/944763002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1253 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1253: bool is_minimized = IsMinimized(); On 2015/02/23 21:43:33, sadrul wrote: ...
5 years, 10 months ago (2015-02-23 23:26:18 UTC) #10
joone
Could you review the updated patch?
5 years, 9 months ago (2015-03-02 19:51:23 UTC) #11
Elliot Glaysher
Even after your comment in window.cc, I don't feel like I understand what this patch ...
5 years, 9 months ago (2015-03-03 00:33:52 UTC) #12
sadrul
> This patch only works for Ubuntu Unity ... Does that mean it doesn't work ...
5 years, 9 months ago (2015-03-03 00:41:46 UTC) #13
joone
On 2015/03/03 00:33:52, Elliot Glaysher wrote: > Even after your comment in window.cc, I don't ...
5 years, 9 months ago (2015-03-03 03:11:18 UTC) #14
joone
On 2015/03/03 00:41:46, sadrul wrote: > > This patch only works for Ubuntu Unity ...
5 years, 9 months ago (2015-03-03 03:29:26 UTC) #15
joone
https://codereview.chromium.org/944763002/diff/20001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (right): https://codereview.chromium.org/944763002/diff/20001/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc#newcode1262 ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1262: } On 2015/03/03 00:41:46, sadrul wrote: > If this ...
5 years, 9 months ago (2015-03-03 03:30:22 UTC) #16
no sievers
https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode616 content/browser/renderer_host/render_widget_host_view_aura.cc:616: if (!content_visible) Can you explain why it makes sense ...
5 years, 9 months ago (2015-03-03 21:12:54 UTC) #18
joone
https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode616 content/browser/renderer_host/render_widget_host_view_aura.cc:616: if (!content_visible) On 2015/03/03 21:12:53, sievers wrote: > Can ...
5 years, 9 months ago (2015-03-04 05:22:45 UTC) #19
no sievers
https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode616 content/browser/renderer_host/render_widget_host_view_aura.cc:616: if (!content_visible) On 2015/03/04 05:22:45, joone wrote: > On ...
5 years, 9 months ago (2015-03-04 19:21:25 UTC) #20
joone
https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode616 content/browser/renderer_host/render_widget_host_view_aura.cc:616: if (!content_visible) On 2015/03/04 19:21:25, sievers wrote: > On ...
5 years, 9 months ago (2015-03-04 22:05:04 UTC) #21
no sievers
On 2015/03/04 22:05:04, joone wrote: > https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc > File content/browser/renderer_host/render_widget_host_view_aura.cc (right): > > https://codereview.chromium.org/944763002/diff/20001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode616 > ...
5 years, 9 months ago (2015-03-04 22:48:44 UTC) #22
joone
On 2015/03/04 22:48:44, sievers wrote: > > > I think it might make sense to ...
5 years, 9 months ago (2015-03-04 23:10:42 UTC) #23
joone
sievers: I've updated the comment. Could you review this?
5 years, 9 months ago (2015-03-09 05:02:21 UTC) #24
sadrul
On 2015/03/03 03:29:26, joone wrote: > On 2015/03/03 00:41:46, sadrul wrote: > > > This ...
5 years, 9 months ago (2015-03-09 17:30:21 UTC) #25
joone
On 2015/03/09 17:30:21, sadrul wrote: > On 2015/03/03 03:29:26, joone wrote: > > On 2015/03/03 ...
5 years, 9 months ago (2015-03-09 22:54:45 UTC) #26
no sievers
On 2015/03/09 22:54:45, joone wrote: > On 2015/03/09 17:30:21, sadrul wrote: > > On 2015/03/03 ...
5 years, 9 months ago (2015-03-09 22:59:31 UTC) #27
joone
5 years, 8 months ago (2015-04-07 21:38:56 UTC) #28
On 2015/03/09 22:59:31, sievers wrote:
> 
> A few thoughts - apart from the compatibility issues:
> - maybe this doesn't have to be a content-API, but can rather be handled by
the
> aura windows internally somehow?
> - you might want to double-check wrt my earlier question wrt delegated frame
> eviction, and make sure that frames also cannot get evicted while you are
still
> in this 'content visible' state

The updated patch used the ViewMsg_SetWindowVisibility message in order to pass
visibility state of the host window to the render process,
which allows the code to be changed minimally.
Currently, I'm working on ChromiumOS for fixing the same problem. It can also
use the ViewMsg_SetWindowVisibility message.

Powered by Google App Engine
This is Rietveld 408576698