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

Issue 6359008: Do not show notifications when in fullscreen or screensaver mode.... (Closed)

Created:
9 years, 11 months ago by jianli
Modified:
9 years, 6 months ago
CC:
chromium-reviews, pam+watch_chromium.org
Visibility:
Public.

Description

Do not show notifications when in fullscreen or screensaver mode. I add full-screen/presentation mode detection for all 3 platforms. I also add screensaver detection for MacOSX and Linux since it is missing in these 2 platforms. BUG=25061 TEST=Manual test Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72539

Patch Set 1 #

Total comments: 34

Patch Set 2 : '' #

Total comments: 3

Patch Set 3 : '' #

Total comments: 19

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 12

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+685 lines, -103 lines) Patch
A chrome/browser/fullscreen.h View 1 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/fullscreen_linux.cc View 1 2 3 1 chunk +144 lines, -0 lines 0 comments Download
A chrome/browser/fullscreen_mac.mm View 1 2 3 4 5 6 7 1 chunk +100 lines, -0 lines 0 comments Download
A chrome/browser/fullscreen_win.cc View 1 2 1 chunk +80 lines, -0 lines 0 comments Download
M chrome/browser/idle.h View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/idle_linux.cc View 1 2 3 4 5 6 7 1 chunk +65 lines, -0 lines 0 comments Download
D chrome/browser/idle_mac.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -16 lines 0 comments Download
A + chrome/browser/idle_mac.mm View 1 2 3 4 5 6 7 1 chunk +88 lines, -5 lines 0 comments Download
M chrome/browser/notifications/notification_ui_manager.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/notifications/notification_ui_manager.cc View 1 2 3 4 5 6 7 4 chunks +37 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_util.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M ui/base/x/x11_util.h View 1 2 3 4 5 6 7 4 chunks +12 lines, -3 lines 0 comments Download
M ui/base/x/x11_util.cc View 1 2 3 4 5 6 7 10 chunks +118 lines, -74 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
jianli
9 years, 11 months ago (2011-01-21 00:13:11 UTC) #1
evanm
Can you fix the review description to not include the extra text? :) (In the ...
9 years, 11 months ago (2011-01-21 00:39:08 UTC) #2
evanm
+ Linux window management expert http://codereview.chromium.org/6359008/diff/1/chrome/browser/notifications/notification_ui_manager.cc File chrome/browser/notifications/notification_ui_manager.cc (right): http://codereview.chromium.org/6359008/diff/1/chrome/browser/notifications/notification_ui_manager.cc#newcode150 chrome/browser/notifications/notification_ui_manager.cc:150: !IsFullScreenMode(); IsFullScreenMode, at least ...
9 years, 11 months ago (2011-01-21 00:42:05 UTC) #3
evanm
http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_linux.cc File chrome/browser/fullscreen_linux.cc (right): http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_linux.cc#newcode33 chrome/browser/fullscreen_linux.cc:33: for (int i = static_cast<int>(num_children - 1); i >= ...
9 years, 11 months ago (2011-01-21 00:43:07 UTC) #4
jianli
http://codereview.chromium.org/6359008/diff/1/chrome/browser/notifications/notification_ui_manager.cc File chrome/browser/notifications/notification_ui_manager.cc (right): http://codereview.chromium.org/6359008/diff/1/chrome/browser/notifications/notification_ui_manager.cc#newcode150 chrome/browser/notifications/notification_ui_manager.cc:150: !IsFullScreenMode(); On 2011/01/21 00:42:05, evanm wrote: > IsFullScreenMode, at ...
9 years, 11 months ago (2011-01-21 01:15:50 UTC) #5
jianli
One other thought. Can I delegate the detection logic to BACKGROUND_X11 thread on Linux? Thanks. ...
9 years, 11 months ago (2011-01-21 01:24:35 UTC) #6
Daniel Erat
http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_linux.cc File chrome/browser/fullscreen_linux.cc (right): http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_linux.cc#newcode51 chrome/browser/fullscreen_linux.cc:51: XID topmost_window = FindTopMostWindow(window); This seems wrong. It looks ...
9 years, 11 months ago (2011-01-21 01:28:17 UTC) #7
John Gregg
http://codereview.chromium.org/6359008/diff/1/chrome/browser/notifications/notification_ui_manager.cc File chrome/browser/notifications/notification_ui_manager.cc (right): http://codereview.chromium.org/6359008/diff/1/chrome/browser/notifications/notification_ui_manager.cc#newcode156 chrome/browser/notifications/notification_ui_manager.cc:156: ShowNotifications(); This doesn't look right at first glance because ...
9 years, 11 months ago (2011-01-21 07:14:50 UTC) #8
dmac
http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_mac.mm File chrome/browser/fullscreen_mac.mm (right): http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_mac.mm#newcode7 chrome/browser/fullscreen_mac.mm:7: #import "base/logging.h" base/logging should be under system imports. http://codereview.chromium.org/6359008/diff/1/chrome/browser/fullscreen_mac.mm#newcode17 ...
9 years, 11 months ago (2011-01-21 19:34:44 UTC) #9
jianli
All comments are addressed. For Evan, since now we're calling gtk_util::EnumerateTopLevelWindows to enumerate all top-level ...
9 years, 11 months ago (2011-01-21 20:21:00 UTC) #10
levin
LGTM Some trivial things to consider below. http://codereview.chromium.org/6359008/diff/22001/chrome/browser/fullscreen_win.cc File chrome/browser/fullscreen_win.cc (right): http://codereview.chromium.org/6359008/diff/22001/chrome/browser/fullscreen_win.cc#newcode14 chrome/browser/fullscreen_win.cc:14: if (FAILED(SHQueryUserNotificationState(&state))) ...
9 years, 11 months ago (2011-01-21 20:41:08 UTC) #11
jianli
I did some more changes on Linux. Daniel, could you please take a look at ...
9 years, 11 months ago (2011-01-22 02:17:00 UTC) #12
Daniel Erat
http://codereview.chromium.org/6359008/diff/34001/chrome/browser/fullscreen_linux.cc File chrome/browser/fullscreen_linux.cc (right): http://codereview.chromium.org/6359008/diff/34001/chrome/browser/fullscreen_linux.cc#newcode98 chrome/browser/fullscreen_linux.cc:98: int index; doesn't look like you're using this http://codereview.chromium.org/6359008/diff/34001/chrome/browser/fullscreen_linux.cc#newcode112 ...
9 years, 11 months ago (2011-01-24 19:54:57 UTC) #13
jianli
http://codereview.chromium.org/6359008/diff/34001/chrome/browser/fullscreen_linux.cc File chrome/browser/fullscreen_linux.cc (right): http://codereview.chromium.org/6359008/diff/34001/chrome/browser/fullscreen_linux.cc#newcode98 chrome/browser/fullscreen_linux.cc:98: int index; On 2011/01/24 19:54:57, Daniel Erat wrote: > ...
9 years, 11 months ago (2011-01-24 23:36:26 UTC) #14
Daniel Erat
Thanks, looks okay to me for Linux. http://codereview.chromium.org/6359008/diff/34001/chrome/browser/idle_linux.cc File chrome/browser/idle_linux.cc (right): http://codereview.chromium.org/6359008/diff/34001/chrome/browser/idle_linux.cc#newcode65 chrome/browser/idle_linux.cc:65: bool ExistsScreensaverWindow() ...
9 years, 11 months ago (2011-01-25 00:34:32 UTC) #15
jianli
On Mon, Jan 24, 2011 at 4:34 PM, <derat@chromium.org> wrote: > IsScreensaverRunning()) It is removed ...
9 years, 11 months ago (2011-01-25 00:36:27 UTC) #16
Daniel Erat
On Mon, Jan 24, 2011 at 4:36 PM, Jian Li <jianli@chromium.org> wrote: > On Mon, ...
9 years, 11 months ago (2011-01-25 00:58:01 UTC) #17
jianli
Done. Please check the latest patch. Thanks. On Mon, Jan 24, 2011 at 4:57 PM, ...
9 years, 11 months ago (2011-01-25 01:01:44 UTC) #18
Daniel Erat
Thanks. On Mon, Jan 24, 2011 at 5:01 PM, Jian Li <jianli@chromium.org> wrote: > Done. ...
9 years, 11 months ago (2011-01-25 01:20:21 UTC) #19
dmac
Couple more comments. The conversion to properties is optional, but would be nice. Sorry I'm ...
9 years, 11 months ago (2011-01-25 05:04:37 UTC) #20
John Gregg
notification_ui_manager.* parts LGTM
9 years, 11 months ago (2011-01-25 17:41:05 UTC) #21
jianli
http://codereview.chromium.org/6359008/diff/43003/chrome/browser/fullscreen_mac.mm File chrome/browser/fullscreen_mac.mm (right): http://codereview.chromium.org/6359008/diff/43003/chrome/browser/fullscreen_mac.mm#newcode19 chrome/browser/fullscreen_mac.mm:19: - (void)setFullScreen:(BOOL)newFullScreen; On 2011/01/25 05:04:37, dmac wrote: > You ...
9 years, 11 months ago (2011-01-25 19:30:15 UTC) #22
dmac
9 years, 11 months ago (2011-01-25 19:34:04 UTC) #23
Mac stuff LGTM.

Powered by Google App Engine
This is Rietveld 408576698