chromium/chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.h"

#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/metrics/user_metrics.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
#include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_switches.h"
#include "components/fullscreen_control/fullscreen_control_view.h"
#include "components/version_info/channel.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/events/types/event_type.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/views/event_monitor.h"
#include "ui/views/view.h"

namespace {

// +----------------------------+
// |         +-------+          |
// |         |Control|          |
// |         +-------+          |
// |                            | <-- Control.bottom * kExitHeightScaleFactor
// |          Screen            |       Buffer for mouse moves or pointer events
// |                            |       before closing the fullscreen exit
// |                            |       control.
// +----------------------------+
//
// The same value is also used for timeout cooldown.
// This is a common scenario where people play video or present slides and they
// just want to keep their cursor on the top. In this case we timeout the exit
// control so that it doesn't show permanently. The user will then need to move
// the cursor out of the cooldown area and move it back to the top to re-trigger
// the exit UI.
constexpr float kExitHeightScaleFactor =;

// +----------------------------+
// |                            |
// |                            |
// |                            | <-- kShowFullscreenExitControlHeight
// |          Screen            |       If a mouse move or pointer event is
// |                            |       above this line, show the fullscreen
// |                            |       exit control.
// |                            |
// +----------------------------+
constexpr float kShowFullscreenExitControlHeight =;

// Time to wait to hide the popup after it is triggered.
constexpr base::TimeDelta kMousePopupTimeout =;
constexpr base::TimeDelta kTouchPopupTimeout =;

// Time to wait before showing the popup when the escape key is held.
constexpr base::TimeDelta kKeyPressPopupDelay =;

bool IsExitUiEnabled() {}

}  // namespace

FullscreenControlHost::FullscreenControlHost(BrowserView* browser_view)
    :{}

FullscreenControlHost::~FullscreenControlHost() = default;

// static
bool FullscreenControlHost::IsFullscreenExitUIEnabled() {}

void FullscreenControlHost::OnEvent(const ui::Event& event) {}

void FullscreenControlHost::OnKeyEvent(const ui::KeyEvent& event) {}

void FullscreenControlHost::OnMouseEvent(const ui::MouseEvent& event) {}

void FullscreenControlHost::OnTouchEvent(const ui::TouchEvent& event) {}

void FullscreenControlHost::OnGestureEvent(const ui::GestureEvent& event) {}

void FullscreenControlHost::Hide(bool animate) {}

bool FullscreenControlHost::IsVisible() const {}

FullscreenControlPopup* FullscreenControlHost::GetPopup() {}

bool FullscreenControlHost::IsPopupCreated() const {}

bool FullscreenControlHost::IsAnimating() const {}

void FullscreenControlHost::ShowForInputEntryMethod(
    InputEntryMethod input_entry_method) {}

void FullscreenControlHost::OnVisibilityChanged() {}

void FullscreenControlHost::StartPopupTimeout(
    InputEntryMethod expected_input_method,
    base::TimeDelta timeout) {}

void FullscreenControlHost::OnPopupTimeout(
    InputEntryMethod expected_input_method) {}

bool FullscreenControlHost::IsExitUiNeeded() {}

bool FullscreenControlHost::IsPointerLocked() {}

float FullscreenControlHost::CalculateCursorBufferHeight() const {}

void FullscreenControlHost::OnExitFullscreenPopupClicked() {}