#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
#include <utility>
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "build/build_config.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "chrome/browser/ui/exclusive_access/pointer_lock_controller.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/chrome_switches.h"
#include "components/input/native_web_keyboard_event.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "ui/events/keycodes/keyboard_codes.h"
WebContents;
namespace {
constexpr base::TimeDelta kHoldEscapeTime = …;
constexpr base::TimeDelta kShowExitBubbleTime = …;
constexpr char kHistogramFullscreenLockStateAtEntryViaApi[] = …;
constexpr char kHistogramFullscreenLockStateAtEntryViaBrowserUi[] = …;
constexpr char kHistogramEscKeyPressedDownWithModifier[] = …;
enum class LockState { … };
bool IsUnmodifiedEscKeyDownEvent(const input::NativeWebKeyboardEvent& event) { … }
}
ExclusiveAccessManager::ExclusiveAccessManager(
ExclusiveAccessContext* exclusive_access_context)
: … { … }
ExclusiveAccessManager::~ExclusiveAccessManager() = default;
ExclusiveAccessBubbleType
ExclusiveAccessManager::GetExclusiveAccessExitBubbleType() const { … }
void ExclusiveAccessManager::UpdateBubble(
ExclusiveAccessBubbleHideCallback first_hide_callback,
bool force_update) { … }
GURL ExclusiveAccessManager::GetExclusiveAccessBubbleURL() const { … }
void ExclusiveAccessManager::RecordLockStateOnEnteringApiFullscreen() const { … }
void ExclusiveAccessManager::RecordLockStateOnEnteringBrowserFullscreen()
const { … }
void ExclusiveAccessManager::OnTabDeactivated(WebContents* web_contents) { … }
void ExclusiveAccessManager::OnTabDetachedFromView(WebContents* web_contents) { … }
void ExclusiveAccessManager::OnTabClosing(WebContents* web_contents) { … }
bool ExclusiveAccessManager::HandleUserKeyEvent(
const input::NativeWebKeyboardEvent& event) { … }
void ExclusiveAccessManager::OnUserInput() { … }
void ExclusiveAccessManager::ExitExclusiveAccess() { … }
void ExclusiveAccessManager::HandleUserHeldEscape() { … }
void ExclusiveAccessManager::RecordLockStateOnEnteringFullscreen(
const char histogram_name[]) const { … }