chromium/third_party/blink/common/input/web_coalesced_input_event_mojom_traits.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 "third_party/blink/public/common/input/web_coalesced_input_event_mojom_traits.h"

#include <memory>

#include "base/containers/contains.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "mojo/public/cpp/base/time_mojom_traits.h"
#include "third_party/blink/public/common/input/web_gesture_event.h"
#include "third_party/blink/public/common/input/web_keyboard_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
#include "ui/events/mojom/event_latency_metadata_mojom_traits.h"
#include "ui/latency/mojom/latency_info_mojom_traits.h"

namespace mojo {
namespace {

blink::mojom::PointerDataPtr PointerDataFromPointerProperties(
    const blink::WebPointerProperties& pointer,
    blink::mojom::MouseDataPtr mouse_data) {}

void PointerPropertiesFromPointerData(
    const blink::mojom::PointerDataPtr& pointer_data,
    blink::WebPointerProperties* pointer_properties) {}

void TouchPointPropertiesFromPointerData(
    const blink::mojom::TouchPointPtr& mojo_touch_point,
    blink::WebTouchPoint* touch_point) {}

// TODO(dtapuska): Remove once SetPositionInXXX moves to WebPointerProperties.
void MouseEventPropertiesFromPointerData(
    const blink::mojom::PointerDataPtr& pointer_data,
    blink::WebMouseEvent* mouse_event) {}

}  // namespace

bool StructTraits<blink::mojom::EventDataView,
                  std::unique_ptr<blink::WebCoalescedInputEvent>>::
    Read(blink::mojom::EventDataView event,
         std::unique_ptr<blink::WebCoalescedInputEvent>* out) {}

// static
blink::mojom::KeyDataPtr
StructTraits<blink::mojom::EventDataView,
             std::unique_ptr<blink::WebCoalescedInputEvent>>::
    key_data(const std::unique_ptr<blink::WebCoalescedInputEvent>& event) {}

// static
blink::mojom::PointerDataPtr
StructTraits<blink::mojom::EventDataView,
             std::unique_ptr<blink::WebCoalescedInputEvent>>::
    pointer_data(const std::unique_ptr<blink::WebCoalescedInputEvent>& event) {}

// static
blink::mojom::GestureDataPtr
StructTraits<blink::mojom::EventDataView,
             std::unique_ptr<blink::WebCoalescedInputEvent>>::
    gesture_data(const std::unique_ptr<blink::WebCoalescedInputEvent>& event) {}

// static
blink::mojom::TouchDataPtr
StructTraits<blink::mojom::EventDataView,
             std::unique_ptr<blink::WebCoalescedInputEvent>>::
    touch_data(const std::unique_ptr<blink::WebCoalescedInputEvent>& event) {}

}  // namespace mojo