diff options
Diffstat (limited to 'chromium/components/arc/common/timer.mojom')
-rw-r--r-- | chromium/components/arc/common/timer.mojom | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/chromium/components/arc/common/timer.mojom b/chromium/components/arc/common/timer.mojom index 6efb88e8f8e..4d8760e3096 100644 --- a/chromium/components/arc/common/timer.mojom +++ b/chromium/components/arc/common/timer.mojom @@ -30,33 +30,21 @@ struct CreateTimerRequest { handle expiration_fd; }; -// Next method ID: 1 -interface Timer { - // Starts the timer to run at |absolute_expiration_time| in the future. If - // the timer is already running, it will be replaced. Notification will be - // performed as an 8-byte write to the associated expiration fd. Returns - // |ArcTimerResult::SUCCESS| if the timer can be started and - // |ArcTimerResult::FAILURE| otherwise. - Start@0(mojo_base.mojom.TimeTicks absolute_expiration_time) - => (ArcTimerResult result); -}; - -struct CreateTimerResponse { - // Type of the clock associated with the timer. - ClockId clock_id; - - // Timer object that will set timers of type |clock_id|. - Timer timer; -}; - -// Next method ID: 1 +// Next method ID: 2 interface TimerHost { - // Creates timers with the given arguments. Returns a null array on failure - // and an array of |Timer| objects of the same size as |arc_timer_requests| - // on success. Only one |Timer| per clock id is created and - // |arc_timer_requests| need to have unique clock ids for success. + // Creates timers with the given arguments. Returns |ArcTimerResult::SUCCESS| + // iff timers corresponding to all clocks in |timer_requests| are created. CreateTimers@0(array<CreateTimerRequest> timer_requests) - => (array<CreateTimerResponse>? response); + => (ArcTimerResult result); + + // Starts the timer of type |clock_id| to run at |absolute_expiration_time| in + // the future. If the timer is already running, it will be replaced. + // Notification will be performed as an 8-byte write to the associated + // expiration fd. Returns |ArcTimerResult::SUCCESS| if the timer can be + // started and |ArcTimerResult::FAILURE| otherwise. + StartTimer@1(ClockId clock_id, + mojo_base.mojom.TimeTicks absolute_expiration_time) + => (ArcTimerResult result); }; // Next method ID: 1 |