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

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

Issue 1814983003: Add an experimental keyboard lock, where Esc must be held to exit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comment nit Created 4 years, 9 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_manager.h
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_manager.h b/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
index dae8b55db34bb6333ee9ae64c4d31636000f9717..567638f3b4e6902b183be83138e7781512da0bd3 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
@@ -8,6 +8,7 @@
#include "base/feature_list.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/timer/timer.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h"
@@ -46,6 +47,7 @@ class ExclusiveAccessManager {
GURL GetExclusiveAccessBubbleURL() const;
+ static bool IsExperimentalKeyboardLockUIEnabled();
static bool IsSimplifiedFullscreenUIEnabled();
// Callbacks ////////////////////////////////////////////////////////////////
@@ -72,9 +74,13 @@ class ExclusiveAccessManager {
void RecordBubbleReshownUMA(ExclusiveAccessBubbleType type);
private:
+ // Called when the user has held down Escape.
+ void HandleUserHeldEscape();
+
ExclusiveAccessContext* const exclusive_access_context_;
FullscreenController fullscreen_controller_;
MouseLockController mouse_lock_controller_;
+ base::OneShotTimer hold_timer_;
DISALLOW_COPY_AND_ASSIGN(ExclusiveAccessManager);
};

Powered by Google App Engine
This is Rietveld 408576698