Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2918)

Unified Diff: services/native_viewport/native_viewport_impl.h

Issue 1029753002: Plumbs through android supplying multipe touch points (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: no pointer Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/native_viewport/native_viewport_impl.h
diff --git a/services/native_viewport/native_viewport_impl.h b/services/native_viewport/native_viewport_impl.h
index 4e778009158c9be3113033bfdc7a8fea8a9a3bae..741b95ccd9dcf7a8fb46e40721ca41c30935d43c 100644
--- a/services/native_viewport/native_viewport_impl.h
+++ b/services/native_viewport/native_viewport_impl.h
@@ -5,6 +5,8 @@
#ifndef SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_
#define SERVICES_NATIVE_VIEWPORT_NATIVE_VIEWPORT_IMPL_H_
+#include <set>
+
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
@@ -59,21 +61,26 @@ class NativeViewportImpl : public mojo::NativeViewport,
// mojo::ErrorHandler implementation.
void OnConnectionError() override;
- void AckEvent();
-
private:
+ // Callback when the dispatcher has processed a message we're waiting on
+ // an ack from. |pointer_id| identifies the pointer the message was associated
+ // with.
+ void AckEvent(int32 pointer_id);
+
bool is_headless_;
scoped_ptr<PlatformViewport> platform_viewport_;
OnscreenContextProvider context_provider_;
bool sent_metrics_;
mojo::ViewportMetricsPtr metrics_;
- bool waiting_for_event_ack_;
CreateCallback create_callback_;
RequestMetricsCallback metrics_callback_;
mojo::NativeViewportEventDispatcherPtr event_dispatcher_;
mojo::Binding<mojo::NativeViewport> binding_;
base::WeakPtrFactory<NativeViewportImpl> weak_factory_;
+ // Set of pointer_ids we've sent a move to and are waiting on an ack.
+ std::set<int32> pointers_waiting_on_ack_;
+
DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl);
};

Powered by Google App Engine
This is Rietveld 408576698