Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: ash/public/interfaces/tray_action_handler.mojom

Issue 2848813002: Introduce ash mojo interface for lock screen action handlers (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/public/interfaces/tray_action_handler.mojom
diff --git a/ash/public/interfaces/tray_action_handler.mojom b/ash/public/interfaces/tray_action_handler.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..4742d1684427f7b07a311384e23c57ded2b1b152
--- /dev/null
+++ b/ash/public/interfaces/tray_action_handler.mojom
@@ -0,0 +1,46 @@
+// 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 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
+
+// An action handler state.
+enum TrayActionHandlerState {
+ // 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 in background (e.g.
+ // handler window for lock screen action was moved to the background to
+ // surfeace user sign-in UI).
+ 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
+};
+
+// Used by a client (e.g. Chrome) to notify ash of tray action handlers’
+// state changes.
+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...
+ // Sets the client to be used to handle action requests.
+ SetClient(TrayActionHandlerClient action_handler);
+
+ // 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.
+ UpdateActionHandlerState(TrayActionHandlerAction action,
+ TrayActionHandlerState state);
+};
+
+// Used by ash to request Chrome to handle an action.
+interface TrayActionHandlerClient {
+ // Requests an action to be handled.
+ RequestHandleAction(TrayActionHandlerAction action);
+};
James Cook 2017/05/03 23:31:50 Nice interface docs, btw.
tbarzic 2017/05/04 20:58:30 Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698