#include "chrome/browser/ui/exclusive_access/keyboard_lock_controller.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/metrics/user_metrics.h"
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_hide_callback.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_permission_manager.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "chrome/browser/ui/ui_features.h"
#include "components/input/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
#include "ui/events/keycodes/keyboard_codes.h"
TimeTicks;
WebContents;
namespace {
constexpr base::TimeDelta kHoldEscapeTime = …;
constexpr base::TimeDelta kDefaultEscRepeatWindow = …;
constexpr int kEscRepeatCountToTriggerUiReshow = …;
bool IsUnmodifiedEscKeyDownEvent(const input::NativeWebKeyboardEvent& event) { … }
}
KeyboardLockController::KeyboardLockController(ExclusiveAccessManager* manager)
: … { … }
KeyboardLockController::~KeyboardLockController() = default;
bool KeyboardLockController::HandleUserPressedEscape() { … }
void KeyboardLockController::HandleUserHeldEscape() { … }
void KeyboardLockController::HandleUserReleasedEscapeEarly() { … }
bool KeyboardLockController::RequiresPressAndHoldEscToExit() const { … }
void KeyboardLockController::ExitExclusiveAccessToPreviousState() { … }
void KeyboardLockController::ExitExclusiveAccessIfNecessary() { … }
void KeyboardLockController::NotifyTabExclusiveAccessLost() { … }
bool KeyboardLockController::IsKeyboardLockActive() const { … }
void KeyboardLockController::RequestKeyboardLock(WebContents* web_contents,
bool esc_key_locked) { … }
bool KeyboardLockController::HandleKeyEvent(
const input::NativeWebKeyboardEvent& event) { … }
void KeyboardLockController::CancelKeyboardLockRequest(WebContents* tab) { … }
void KeyboardLockController::LockKeyboard(
base::WeakPtr<content::WebContents> web_contents,
bool esc_key_locked) { … }
void KeyboardLockController::UnlockKeyboard() { … }
void KeyboardLockController::UnlockKeyboardForWebContents(
base::WeakPtr<content::WebContents> web_contents) { … }
void KeyboardLockController::HandleUserHeldEscapeDeprecated() { … }
void KeyboardLockController::ReShowExitBubbleIfNeeded() { … }