chromium/ui/touch_selection/touch_handle.cc

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

#include "ui/touch_selection/touch_handle.h"

#include <algorithm>
#include <cmath>
#include <ostream>

#include "base/check_op.h"
#include "base/notreached.h"

namespace ui {

namespace {

// Maximum duration of a fade sequence.
constexpr auto kFadeDuration =;

// Maximum amount of travel for a fade sequence. This avoids handle "ghosting"
// when the handle is moving rapidly while the fade is active.
constexpr double kFadeDistanceSquared =;

// Avoid using an empty touch rect, as it may fail the intersection test event
// if it lies within the other rect's bounds.
constexpr float kMinTouchMajorForHitTesting =;

// The maximum touch size to use when computing whether a touch point is
// targetting a touch handle. This is necessary for devices that misreport
// touch radii, preventing inappropriately largely touch sizes from completely
// breaking handle dragging behavior.
constexpr float kMaxTouchMajorForHitTesting =;

// Note that the intersection region is boundary *exclusive*.
bool RectIntersectsCircle(const gfx::RectF& rect,
                          const gfx::PointF& circle_center,
                          float circle_radius) {}

}  // namespace

// TODO(AviD): Remove this once logging(DCHECK) supports enum class.
static std::ostream& operator<<(std::ostream& os,
                                const TouchHandleOrientation& orientation) {}

// Responsible for rendering a selection or insertion handle for text editing.
TouchHandle::TouchHandle(TouchHandleClient* client,
                         TouchHandleOrientation orientation,
                         const gfx::RectF& viewport_rect)
    :{}

TouchHandle::~TouchHandle() {}

void TouchHandle::SetEnabled(bool enabled) {}

void TouchHandle::SetVisible(bool visible, AnimationStyle animation_style) {}

void TouchHandle::SetFocus(const gfx::PointF& top, const gfx::PointF& bottom) {}

void TouchHandle::SetViewportRect(const gfx::RectF& viewport_rect) {}

void TouchHandle::SetOrientation(TouchHandleOrientation orientation) {}

bool TouchHandle::WillHandleTouchEvent(const MotionEvent& event) {}

bool TouchHandle::IsActive() const {}

bool TouchHandle::Animate(base::TimeTicks frame_time) {}

gfx::RectF TouchHandle::GetVisibleBounds() const {}

void TouchHandle::UpdateHandleLayout() {}

void TouchHandle::SetTransparent() {}

gfx::PointF TouchHandle::ComputeHandleOrigin() const {}

void TouchHandle::BeginDrag() {}

void TouchHandle::EndDrag() {}

void TouchHandle::BeginFade() {}

void TouchHandle::EndFade() {}

void TouchHandle::SetAlpha(float alpha) {}

void TouchHandle::SetUpdateLayoutRequired() {}

}  // namespace ui