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

Unified Diff: chrome/browser/ui/exclusive_access/exclusive_access_bubble.h

Issue 1254543002: Change exclusive access popup behaviour with simplified-fullscreen-ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@exclusiveaccess-remove-confirmation
Patch Set: Minor. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
index 57f55c0c7a1decd1c63e171690c9be1560a2d4b5..98a281c4ce1b179b879d82f6cb54919eb48c31a8 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
@@ -31,6 +31,10 @@ class ExclusiveAccessBubble : public gfx::AnimationDelegate {
static const int kPaddingPx; // Amount of padding around the link
static const int kInitialDelayMs; // Initial time bubble remains onscreen
static const int kIdleTimeMs; // Time before mouse idle triggers hide
+ // Time to show initial message (simplified fullscreen UI).
+ static const int kInitialDebounceTimeMs;
+ // Time to re-notify user (simplified fullscreen UI).
+ static const int kRenotifyTimeMs;
scheib 2015/08/04 19:36:28 kRenotifyTimeM -> kSnoozeNotificationsTimeMs And c
Matt Giuca 2015/08/05 03:27:20 Done.
scheib 2015/08/05 05:24:19 Thanks. OK to leave like this, but BTW I think it'
Matt Giuca 2015/08/06 03:33:03 Done.
static const int kPositionCheckHz; // How fast to check the mouse position
static const int kSlideInRegionHeightPx;
// Height of region triggering
@@ -95,13 +99,24 @@ class ExclusiveAccessBubble : public gfx::AnimationDelegate {
ExclusiveAccessBubbleType bubble_type_;
private:
- // Timer to delay before allowing the bubble to hide after it's initially
- // shown.
- base::OneShotTimer<ExclusiveAccessBubble> initial_delay_;
+ // When this timer is active, prevent the bubble from hiding. This ensures it
+ // will be displayed for a minimum amount of time (which can be extended by
+ // the user moving the mouse to the top of the screen and holding it there).
+ base::OneShotTimer<ExclusiveAccessBubble> hide_timeout_;
// Timer to see how long the mouse has been idle.
base::OneShotTimer<ExclusiveAccessBubble> idle_timeout_;
+ // When this timer has elapsed, we will aggressively notify the user about
msw 2015/08/04 18:21:51 What's aggressive about this? Remove 'aggressive'
Matt Giuca 2015/08/05 03:27:20 Done. (And renamed to suppress_notify_timeout_).
+ // currently active exclusive access (on the next mouse/keyboard input). While
msw 2015/08/04 18:21:51 nit: no keyboard...
Matt Giuca 2015/08/05 03:27:20 Done.
scheib 2015/08/05 05:24:19 Long term we'd want keyboard too, though, right?
Matt Giuca 2015/08/06 03:33:03 Yeah. I originally had that comment there because
+ // the timer is ticking, we do not notify unless the user mouses to the top of
scheib 2015/08/04 19:36:28 Mouse location should have no impact on notificati
Matt Giuca 2015/08/05 03:27:20 Done.
Matt Giuca 2015/08/05 03:35:08 Oh sorry, by "Done" I mean "not done" (just update
scheib 2015/08/05 05:24:19 Acknowledged. Follow patch is fine.
+ // the screen.
+ //
+ // This has two uses: 1. a short debounce period when first entering exclusive
+ // access (so we do not immediately notify the user), and 2. a very long
+ // period after already notifying the user once, to re-notify them.
+ base::OneShotTimer<ExclusiveAccessBubble> aggressive_notify_timeout_;
+
// Timer to poll the current mouse position. We can't just listen for mouse
// events without putting a non-empty HWND onscreen (or hooking Windows, which
// has other problems), so instead we run a low-frequency poller to see if the

Powered by Google App Engine
This is Rietveld 408576698