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 TrayActionHandlerAction { kNewLockScreenNote, }; | |
|
James Cook
2017/05/03 23:31:50
It doesn't seem like we will have many of these ac
tbarzic
2017/05/04 20:58:30
OK, sounds good, I've myself started considering t
| |
| 9 | |
| 10 // An action handler state. | |
| 11 enum TrayActionHandlerState { | |
| 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 in background (e.g. | |
| 26 // handler window for lock screen action was moved to the background to | |
| 27 // surfeace user sign-in UI). | |
| 28 kBackground, | |
|
James Cook
2017/05/03 23:31:50
I don't understand this state. Why would the app b
tbarzic
2017/05/04 20:58:30
To preserve the state of the app window (and be ab
| |
| 29 }; | |
| 30 | |
| 31 // Used by a client (e.g. Chrome) to notify ash of tray action handlers’ | |
| 32 // state changes. | |
| 33 interface TrayActionHandlerController { | |
|
James Cook
2017/05/03 23:31:50
Sorry to thrash on names. Our preferred naming sty
tbarzic
2017/05/04 20:58:30
Don't be sorry :) I like having better names...
| |
| 34 // Sets the client to be used to handle action requests. | |
| 35 SetClient(TrayActionHandlerClient action_handler); | |
| 36 | |
| 37 // Updates action handler state for a tray action. | |
|
James Cook
2017/05/03 23:31:50
Is it required to have a client before calling thi
tbarzic
2017/05/04 20:58:30
Done.
| |
| 38 UpdateActionHandlerState(TrayActionHandlerAction action, | |
| 39 TrayActionHandlerState state); | |
| 40 }; | |
| 41 | |
| 42 // Used by ash to request Chrome to handle an action. | |
| 43 interface TrayActionHandlerClient { | |
| 44 // Requests an action to be handled. | |
| 45 RequestHandleAction(TrayActionHandlerAction action); | |
| 46 }; | |
|
James Cook
2017/05/03 23:31:50
Nice interface docs, btw.
tbarzic
2017/05/04 20:58:30
Acknowledged.
| |
| OLD | NEW |