Chromium Code Reviews| Index: ash/public/interfaces/action_handler.mojom |
| diff --git a/ash/public/interfaces/action_handler.mojom b/ash/public/interfaces/action_handler.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f0e509974dffe73411a73fff00e4c7606a505e0c |
| --- /dev/null |
| +++ b/ash/public/interfaces/action_handler.mojom |
| @@ -0,0 +1,45 @@ |
| +// 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; |
| + |
| +// Supported actions. |
| +enum ActionHandlerAction { kNewNote, }; |
| + |
| +// An action handler state. |
| +enum ActionHandlerState { |
| + // The client does not support the action. |
| + kNotSupported, |
| + |
| + // 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 the handler has been |
| + // hidden (e.g. for lock screen action, the action handler is backgrounded by |
| + // the lock UI). |
| + kHidden, |
| +}; |
| + |
| +// Used by a client (e.g. Chrome) to update state of app action handlers. |
| +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
|
| + // Sets the action handler to be used to handle action requests. |
| + SetActionHandler(ActionHandler action_handler); |
| + |
| + // Sets state of an app action available on lock screen. |
| + UpdateActionState(ActionHandlerAction action, ActionHandlerState state); |
| +}; |
| + |
| +// Used by ash to request Chrome to handle an action. |
| +interface ActionHandler { |
| + |
| + // Requests an action to be handled. |
| + RequestHandleAction(ActionHandlerAction action); |
| +}; |