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

Unified Diff: content/renderer/gpu/actions_runner.h

Issue 2348183003: Test synthetic pointer action on pointer event tests (Closed)
Patch Set: pointer event tests Created 4 years 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
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/gpu/actions_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/actions_runner.h
diff --git a/content/renderer/gpu/actions_runner.h b/content/renderer/gpu/actions_runner.h
new file mode 100644
index 0000000000000000000000000000000000000000..d302264ff6401b908717c5d4e9206c941129fcff
--- /dev/null
+++ b/content/renderer/gpu/actions_runner.h
@@ -0,0 +1,55 @@
+// Copyright (c) 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 CONTENT_RENDERER_GPU_ACTION_RUNNER_H_
+#define CONTENT_RENDERER_GPU_ACTION_RUNNER_H_
+
+#include <cstddef>
+#include <set>
+#include <string>
+
+#include "content/common/input/synthetic_pointer_action_list_params.h"
+
+namespace base {
+class DictionaryValue;
+class ListValue;
+} // namespace base
+
+namespace content {
+
+class ActionsRunner {
+ public:
+ ActionsRunner(base::Value* value);
+ virtual ~ActionsRunner();
+ bool ParseSources();
+ void Run();
+ size_t longest_action_sequence() { return longest_action_sequence_; }
+ std::string error_message() { return error_message_; }
+ std::unique_ptr<SyntheticPointerActionListParams> gesture_params() {
+ return std::move(gesture_params_);
+ }
+
+ private:
+ bool ParsePointerActions(const base::DictionaryValue& pointer_actions);
+ bool ParseActions(const base::ListValue& actions);
+ bool ParseAction(const base::DictionaryValue& action,
+ SyntheticPointerActionListParams::ParamList& param_list);
+
+ std::unique_ptr<SyntheticPointerActionListParams> gesture_params_;
+ std::vector<SyntheticPointerActionListParams::ParamList>
+ pointer_actions_list_;
+ size_t longest_action_sequence_;
+ std::set<int> ids_;
+ size_t i, j;
+ std::string error_message_;
+
+ // XXX: this probably gets deleted with the v8 context, so be more careful
+ // about handling it
+ base::Value* value_;
+ int index_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_GPU_ACTION_RUNNER_H_
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/gpu/actions_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698