gecko-dev/xpcom/threads/nsIRunnable.idl
Stone Shih 393c62eba7 Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug.
The test helper_touch_action_regions.html uses nsDOMWindowUtils to synthesize native input events and creates some runnables to trigger the test. It expects the runnables which synthesize native input events are processed first, then the runnables to continue the test, and finally the input events are forwarded from chrome process to content process. Enabling event prioritization may change the execution order.
Wraps those runnables to synthesize native input events as priority=input and dispatches those runnables to continue the test with priority=input to make sure the execution order is as expected.

MozReview-Commit-ID: 8hkaB1FRW9T
2017-05-19 15:41:24 +08:00

29 lines
877 B
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
/**
* Represents a task which can be dispatched to a thread for execution.
*/
[scriptable, function, uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40)]
interface nsIRunnable : nsISupports
{
/**
* The function implementing the task to be run.
*/
void run();
};
[scriptable, uuid(e75aa42a-80a9-11e6-afb5-e89d87348e2c)]
interface nsIRunnablePriority : nsISupports
{
const unsigned short PRIORITY_NORMAL = 0;
const unsigned short PRIORITY_INPUT = 1;
const unsigned short PRIORITY_HIGH = 2;
readonly attribute unsigned long priority;
};