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

Issue 20125004: Use ContentViewCore's container view to keep screen on (Closed)

Created:
7 years, 5 months ago by michaelbai
Modified:
7 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, punyabrata
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

The window's KEEP_SCREEN_ON flag is more like controlling the screen from an Activity level, and we shouldn't use it instead, view's KEEP_SCREEN_ON flag should be used. This patch attaches a zero size view to ContentViewCore's mContainerView instead of view tree, so once the ContainerView is invisible, the screen can turned off even PowerSaveBlocker not removed. BUG=270903 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216840

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Use ViewAndroid #

Patch Set 3 : use ViewAndroid #

Total comments: 4

Patch Set 4 : address comments #

Total comments: 2

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -30 lines) Patch
M content/browser/power_save_blocker_android.cc View 1 5 chunks +12 lines, -10 lines 0 comments Download
M content/browser/power_save_blocker_impl.h View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/ViewAndroid.java View 1 2 3 4 3 chunks +27 lines, -0 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/WindowAndroid.java View 1 2 chunks +0 lines, -9 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
michaelbai
I still not comfortable with attaching a new view, but it seems the better way. ...
7 years, 5 months ago (2013-07-24 23:54:28 UTC) #1
wjia(left Chromium)
On 2013/07/24 23:54:28, michaelbai wrote: > I still not comfortable with attaching a new view, ...
7 years, 5 months ago (2013-07-25 00:41:17 UTC) #2
michaelbai
On 2013/07/25 00:41:17, wjia wrote: > On 2013/07/24 23:54:28, michaelbai wrote: > > I still ...
7 years, 5 months ago (2013-07-25 03:14:16 UTC) #3
wjia(left Chromium)
On 2013/07/25 03:14:16, michaelbai wrote: > The reason to move it to WebContentsImpl is RenderViewHost ...
7 years, 5 months ago (2013-07-25 16:52:41 UTC) #4
michaelbai
On 2013/07/25 16:52:41, wjia wrote: > On 2013/07/25 03:14:16, michaelbai wrote: > > The reason ...
7 years, 5 months ago (2013-07-25 17:25:55 UTC) #5
punyabrata1
On 2013/07/25 17:25:55, michaelbai wrote: > On 2013/07/25 16:52:41, wjia wrote: > > On 2013/07/25 ...
7 years, 5 months ago (2013-07-25 18:23:19 UTC) #6
michaelbai
On 2013/07/25 18:23:19, punyabrata1 wrote: > On 2013/07/25 17:25:55, michaelbai wrote: > > On 2013/07/25 ...
7 years, 4 months ago (2013-07-26 19:50:04 UTC) #7
wjia(left Chromium)
How about Ray's comment? Wei On Fri, Jul 26, 2013 at 12:50 PM, <michaelbai@chromium.org> wrote: ...
7 years, 4 months ago (2013-07-26 21:10:27 UTC) #8
michaelbai
I don't know whether there is any API can keep screen on globally. Why the ...
7 years, 4 months ago (2013-07-26 21:49:58 UTC) #9
wjia(left Chromium)
On 2013/07/26 21:49:58, michaelbai wrote: > I don't know whether there is any API can ...
7 years, 4 months ago (2013-07-26 23:34:22 UTC) #10
michaelbai
On 2013/07/26 23:34:22, wjia wrote: > On 2013/07/26 21:49:58, michaelbai wrote: > > I don't ...
7 years, 4 months ago (2013-07-26 23:51:35 UTC) #11
wjia(left Chromium)
We are fine with this patch since video will not be delivered to the remote ...
7 years, 4 months ago (2013-07-27 01:51:07 UTC) #12
joth
Sorry - I wrote feedback on this but failed to hit 'send' https://codereview.chromium.org/20125004/diff/2001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ...
7 years, 4 months ago (2013-08-06 18:40:15 UTC) #13
michaelbai
PTAL https://codereview.chromium.org/20125004/diff/2001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/20125004/diff/2001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode2925 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2925: public void setKeepScreenOn(boolean keepScreenOn) { On 2013/08/06 18:40:15, ...
7 years, 4 months ago (2013-08-06 22:10:57 UTC) #14
joth
lgtm with a couple nits Thanks! https://codereview.chromium.org/20125004/diff/21001/content/browser/power_save_blocker_impl.h File content/browser/power_save_blocker_impl.h (right): https://codereview.chromium.org/20125004/diff/21001/content/browser/power_save_blocker_impl.h#newcode14 content/browser/power_save_blocker_impl.h:14: class WebContents; not ...
7 years, 4 months ago (2013-08-08 21:48:57 UTC) #15
michaelbai
jam, content/browser/ Yaron, ui/android, content/public/android. Thanks https://codereview.chromium.org/20125004/diff/21001/content/browser/power_save_blocker_impl.h File content/browser/power_save_blocker_impl.h (right): https://codereview.chromium.org/20125004/diff/21001/content/browser/power_save_blocker_impl.h#newcode14 content/browser/power_save_blocker_impl.h:14: class WebContents; On ...
7 years, 4 months ago (2013-08-09 17:46:51 UTC) #16
Yaron
This should have a BUG= content is trivially looks good. + newt for ui/
7 years, 4 months ago (2013-08-09 17:56:32 UTC) #17
michaelbai
On 2013/08/09 17:56:32, Yaron wrote: > This should have a BUG= > content is trivially ...
7 years, 4 months ago (2013-08-09 18:36:51 UTC) #18
jam
lgtm
7 years, 4 months ago (2013-08-09 20:32:58 UTC) #19
newt (away)
https://codereview.chromium.org/20125004/diff/27001/ui/android/java/src/org/chromium/ui/ViewAndroid.java File ui/android/java/src/org/chromium/ui/ViewAndroid.java (right): https://codereview.chromium.org/20125004/diff/27001/ui/android/java/src/org/chromium/ui/ViewAndroid.java#newcode66 ui/android/java/src/org/chromium/ui/ViewAndroid.java:66: public void setKeepScreenOn(boolean keepScreenOn) { I think it should ...
7 years, 4 months ago (2013-08-09 20:57:21 UTC) #20
michaelbai
https://codereview.chromium.org/20125004/diff/27001/ui/android/java/src/org/chromium/ui/ViewAndroid.java File ui/android/java/src/org/chromium/ui/ViewAndroid.java (right): https://codereview.chromium.org/20125004/diff/27001/ui/android/java/src/org/chromium/ui/ViewAndroid.java#newcode66 ui/android/java/src/org/chromium/ui/ViewAndroid.java:66: public void setKeepScreenOn(boolean keepScreenOn) { It was named by ...
7 years, 4 months ago (2013-08-09 23:06:50 UTC) #21
newt (away)
thanks. lgtm!
7 years, 4 months ago (2013-08-10 00:14:22 UTC) #22
joth
lgtm
7 years, 4 months ago (2013-08-10 01:31:06 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaelbai@chromium.org/20125004/35001
7 years, 4 months ago (2013-08-10 01:34:48 UTC) #24
commit-bot: I haz the power
7 years, 4 months ago (2013-08-10 13:48:42 UTC) #25
Message was sent while issue was closed.
Change committed as 216840

Powered by Google App Engine
This is Rietveld 408576698