Jason Simmons 9f2d723006 Replace the legacy pointer input event handling with PointerPackets
With this change we no longer need engine/core/events and its IDL bindings.
2015-11-10 14:34:12 -08:00

50 lines
1.2 KiB
C++

// Copyright 2014 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 SKY_ENGINE_CORE_WINDOW_WINDOW_H_
#define SKY_ENGINE_CORE_WINDOW_WINDOW_H_
#include "base/time/time.h"
#include "sky/engine/tonic/dart_persistent_value.h"
#include "sky/engine/wtf/text/WTFString.h"
#include "sky/services/pointer/pointer.mojom.h"
namespace blink {
class Scene;
struct SkyDisplayMetrics;
class DartLibraryNatives;
class WindowClient {
public:
virtual void ScheduleFrame() = 0;
virtual void Render(Scene* scene) = 0;
protected:
virtual ~WindowClient();
};
class Window {
public:
explicit Window(WindowClient* client);
~Window();
WindowClient* client() const { return client_; }
void DidCreateIsolate();
void UpdateWindowMetrics(const SkyDisplayMetrics& metrics);
void DispatchEvent(const String& event_type, double time_stamp);
void DispatchPointerPacket(const pointer::PointerPacketPtr& packet);
void BeginFrame(base::TimeTicks frameTime);
static void RegisterNatives(DartLibraryNatives* natives);
private:
WindowClient* client_;
DartPersistentValue library_;
};
} // namespace blink
#endif // SKY_ENGINE_CORE_WINDOW_WINDOW_H_