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 // Supported actions. | |
| 8 enum ActionHandlerAction { kNewNote, }; | |
| 9 | |
| 10 // An action handler state. | |
| 11 enum ActionHandlerState { | |
| 12 // The client does not support the action. | |
| 13 kNotSupported, | |
| 14 | |
| 15 // The client supports the action and is not currently handling the action. | |
| 16 kAvailable, | |
| 17 | |
| 18 // The client received the request for the action and it is launching the | |
| 19 // flow to handle it. | |
| 20 kLaunching, | |
| 21 | |
| 22 // The client is currently handling the action. | |
| 23 kActive, | |
| 24 | |
| 25 // The client is currently handling the action, but the handler has been | |
| 26 // hidden (e.g. for lock screen action, the action handler is backgrounded by | |
| 27 // the lock UI). | |
| 28 kHidden, | |
| 29 }; | |
| 30 | |
| 31 // Used by a client (e.g. Chrome) to update state of app action handlers. | |
| 32 interface ActionHandlerStateController { | |
|
James Cook
2017/05/02 15:43:38
"ActionHandler" seems like a very generic name. Is
tbarzic
2017/05/02 17:05:54
Yeah, I'm not to content with the name either.
Th
| |
| 33 // Sets the action handler to be used to handle action requests. | |
| 34 SetActionHandler(ActionHandler action_handler); | |
| 35 | |
| 36 // Sets state of an app action available on lock screen. | |
| 37 UpdateActionState(ActionHandlerAction action, ActionHandlerState state); | |
| 38 }; | |
| 39 | |
| 40 // Used by ash to request Chrome to handle an action. | |
| 41 interface ActionHandler { | |
| 42 | |
| 43 // Requests an action to be handled. | |
| 44 RequestHandleAction(ActionHandlerAction action); | |
| 45 }; | |
| OLD | NEW |