#include "ui/views/widget/root_view.h"
#include <algorithm>
#include <memory>
#include <string_view>
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/memory/raw_ref.h"
#include "base/scoped_observation.h"
#include "build/build_config.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/accessibility/platform/ax_platform_node.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom-shared.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/compositor/layer.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_recognizer.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/canvas.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/drag_controller.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_targeter.h"
#include "ui/views/views_features.h"
#include "ui/views/widget/root_view_targeter.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
DispatchDetails;
namespace views::internal {
namespace {
class MouseEnterExitEvent : public ui::MouseEvent { … };
class DanglingMouseMoveHandlerOnViewDestroyingChecker
: public views::ViewObserver { … };
}
class AnnounceTextView : public View { … };
BEGIN_METADATA(…)
class PreEventDispatchHandler : public ui::EventHandler { … };
class PostEventDispatchHandler : public ui::EventHandler { … };
RootView::RootView(Widget* widget)
: … { … }
RootView::~RootView() { … }
void RootView::SetContentsView(View* contents_view) { … }
View* RootView::GetContentsView() { … }
void RootView::NotifyNativeViewHierarchyChanged() { … }
void RootView::SetFocusTraversableParent(FocusTraversable* focus_traversable) { … }
void RootView::SetFocusTraversableParentView(View* view) { … }
void RootView::ThemeChanged() { … }
void RootView::ResetEventHandlers() { … }
void RootView::DeviceScaleFactorChanged(float old_device_scale_factor,
float new_device_scale_factor) { … }
AnnounceTextView* RootView::GetOrCreateAnnounceView() { … }
void RootView::AnnounceTextAs(
const std::u16string& text,
ui::AXPlatformNode::AnnouncementType announcement_type) { … }
View* RootView::GetAnnounceViewForTesting() { … }
FocusSearch* RootView::GetFocusSearch() { … }
FocusTraversable* RootView::GetFocusTraversableParent() { … }
View* RootView::GetFocusTraversableParentView() { … }
ui::EventTarget* RootView::GetRootForEvent(ui::Event* event) { … }
ui::EventTargeter* RootView::GetDefaultEventTargeter() { … }
void RootView::OnEventProcessingStarted(ui::Event* event) { … }
void RootView::OnEventProcessingFinished(ui::Event* event) { … }
const Widget* RootView::GetWidget() const { … }
Widget* RootView::GetWidget() { … }
bool RootView::IsDrawn() const { … }
bool RootView::OnMousePressed(const ui::MouseEvent& event) { … }
bool RootView::OnMouseDragged(const ui::MouseEvent& event) { … }
void RootView::OnMouseReleased(const ui::MouseEvent& event) { … }
void RootView::OnMouseCaptureLost() { … }
void RootView::OnMouseMoved(const ui::MouseEvent& event) { … }
void RootView::OnMouseEntered(const ui::MouseEvent& event) { … }
void RootView::OnMouseExited(const ui::MouseEvent& event) { … }
bool RootView::OnMouseWheel(const ui::MouseWheelEvent& event) { … }
void RootView::MaybeNotifyGestureHandlerBeforeReplacement() { … }
void RootView::SetMouseAndGestureHandler(View* new_handler) { … }
void RootView::SetMouseHandler(View* new_mouse_handler) { … }
void RootView::GetAccessibleNodeData(ui::AXNodeData* node_data) { … }
void RootView::UpdateParentLayer() { … }
void RootView::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) { … }
void RootView::VisibilityChanged(View* , bool is_visible) { … }
void RootView::OnDidSchedulePaint(const gfx::Rect& rect) { … }
void RootView::OnPaint(gfx::Canvas* canvas) { … }
View::LayerOffsetData RootView::CalculateOffsetToAncestorWithLayer(
ui::Layer** layer_parent) { … }
View::DragInfo* RootView::GetDragInfo() { … }
void RootView::UpdateCursor(const ui::MouseEvent& event) { … }
void RootView::SetMouseLocationAndFlags(const ui::MouseEvent& event) { … }
void RootView::HandleMouseEnteredOrMoved(const ui::MouseEvent& event) { … }
ui::EventDispatchDetails RootView::NotifyEnterExitOfDescendant(
const ui::MouseEvent& event,
ui::EventType type,
View* view,
View* sibling) { … }
bool RootView::CanDispatchToTarget(ui::EventTarget* target) { … }
ui::EventDispatchDetails RootView::PreDispatchEvent(ui::EventTarget* target,
ui::Event* event) { … }
ui::EventDispatchDetails RootView::PostDispatchEvent(ui::EventTarget* target,
const ui::Event& event) { … }
BEGIN_METADATA(…)
}