Chromium Code Reviews| Index: ash/public/interfaces/tray_action.mojom |
| diff --git a/ash/public/interfaces/tray_action.mojom b/ash/public/interfaces/tray_action.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3ec38f336655bd3cbbed4607a5bd62bcb76532c |
| --- /dev/null |
| +++ b/ash/public/interfaces/tray_action.mojom |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2017 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. |
| + |
| +module ash.mojom; |
| + |
| +// An action handler state. |
| +enum TrayActionState { |
| + // The client does not support the action. |
| + kNotSupported, |
| + |
| + // The client supports the action, but the action cannot be handled at the |
| + // moment, for example due to user session not being locked. |
| + kNotAvailable, |
| + |
| + // The client supports the action and is not currently handling the action. |
| + kAvailable, |
| + |
| + // The client received the request for the action and it is launching the |
| + // flow to handle it. |
| + kLaunching, |
| + |
| + // The client is currently handling the action. |
| + kActive, |
| + |
| + // The client is currently handling the action, but in background (e.g. |
| + // handler window for lock screen action was moved to the background to |
| + // surfeace user sign-in UI). |
| + kBackground, |
| +}; |
| + |
| +// Used by a client (e.g. Chrome) to notify ash of tray action handlers’ |
| +// state changes. |
| +interface TrayAction { |
| + // Sets the client to be used to handle action requests. |
| + SetClient(TrayActionClient action_handler); |
|
xiyuan
2017/05/04 21:19:16
nit: wrong intent
tbarzic
2017/05/04 23:27:18
Done.
|
| + |
| + // Updates action state for the lock screen note action. If called with no |
| + // client set, the state change will not take effect until a client is set. |
| + // Null client is equivalent to kNoteSupported state. |
| + UpdateLockScreenNoteState(TrayActionState state); |
| +}; |
| + |
| +// Used by ash to request Chrome to handle an action. |
| +interface TrayActionClient { |
| + // Requests a lock screen note action to be handled. |
| + RequestNewLockScreenNote(); |
| +}; |