flutter_flutter/lib/ui/window/pointer_data_packet.h
Adam Barth 862d9e9f6b Android should use PointerDataPackets (#3092)
We now use JNI rather than Mojo to transport pointer data from Java to Dart.
Also, fill in a few more of the pointer data fields from information in Java.
2016-10-03 21:02:46 -07:00

35 lines
853 B
C++

// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_
#define FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_
#include <string.h>
#include <vector>
#include "flutter/lib/ui/window/pointer_data.h"
#include "lib/ftl/macros.h"
namespace blink {
class PointerDataPacket {
public:
explicit PointerDataPacket(size_t count);
PointerDataPacket(char* data, size_t num_bytes);
~PointerDataPacket();
void SetPointerData(size_t i, const PointerData& data);
const std::vector<char>& data() const { return data_; }
private:
std::vector<char> data_;
FTL_DISALLOW_COPY_AND_ASSIGN(PointerDataPacket);
};
} // namespace blink
#endif // FLUTTER_LIB_UI_WINDOW_POINTER_DATA_PACKET_H_