Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module ash.mojom; | |
| 6 | |
| 7 // An action handler state. | |
| 8 enum TrayActionState { | |
| 9 // The client does not support the action. | |
| 10 kNotSupported, | |
| 11 | |
| 12 // The client supports the action, but the action cannot be handled at the | |
| 13 // moment, for example due to user session not being locked. | |
| 14 kNotAvailable, | |
| 15 | |
| 16 // The client supports the action and is not currently handling the action. | |
| 17 kAvailable, | |
| 18 | |
| 19 // The client received the request for the action and it is launching the | |
| 20 // flow to handle it. | |
| 21 kLaunching, | |
| 22 | |
| 23 // The client is currently handling the action. | |
| 24 kActive, | |
| 25 | |
| 26 // The client is currently handling the action, but in background (e.g. | |
| 27 // handler window for lock screen action was moved to the background to | |
| 28 // surfeace user sign-in UI). | |
| 29 kBackground, | |
| 30 }; | |
| 31 | |
| 32 // Used by a client (e.g. Chrome) to notify ash of tray action handlers’ | |
| 33 // state changes. | |
| 34 interface TrayAction { | |
| 35 // Sets the client to be used to handle action requests. | |
| 36 SetClient(TrayActionClient action_handler); | |
|
xiyuan
2017/05/04 21:19:16
nit: wrong intent
tbarzic
2017/05/04 23:27:18
Done.
| |
| 37 | |
| 38 // Updates action state for the lock screen note action. If called with no | |
| 39 // client set, the state change will not take effect until a client is set. | |
| 40 // Null client is equivalent to kNoteSupported state. | |
| 41 UpdateLockScreenNoteState(TrayActionState state); | |
| 42 }; | |
| 43 | |
| 44 // Used by ash to request Chrome to handle an action. | |
| 45 interface TrayActionClient { | |
| 46 // Requests a lock screen note action to be handled. | |
| 47 RequestNewLockScreenNote(); | |
| 48 }; | |
| OLD | NEW |