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

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

Issue 2848813002: Introduce ash mojo interface for lock screen action handlers (Closed)
Patch Set: . Created 3 years, 7 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.mojom
diff --git a/ash/public/interfaces/tray_action.mojom b/ash/public/interfaces/tray_action.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..e3ec38f336655bd3cbbed4607a5bd62bcb76532c
--- /dev/null
+++ b/ash/public/interfaces/tray_action.mojom
@@ -0,0 +1,48 @@
+// 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;
+
+// An action handler state.
+enum TrayActionState {
+ // The client does not support the action.
+ kNotSupported,
+
+ // The client supports the action, but the action cannot be handled at the
+ // moment, for example due to user session not being locked.
+ kNotAvailable,
+
+ // 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,
+};
+
+// Used by a client (e.g. Chrome) to notify ash of tray action handlers’
+// state changes.
+interface TrayAction {
+ // Sets the client to be used to handle action requests.
+ SetClient(TrayActionClient action_handler);
xiyuan 2017/05/04 21:19:16 nit: wrong intent
tbarzic 2017/05/04 23:27:18 Done.
+
+ // Updates action state for the lock screen note action. If called with no
+ // client set, the state change will not take effect until a client is set.
+ // Null client is equivalent to kNoteSupported state.
+ UpdateLockScreenNoteState(TrayActionState state);
+};
+
+// Used by ash to request Chrome to handle an action.
+interface TrayActionClient {
+ // Requests a lock screen note action to be handled.
+ RequestNewLockScreenNote();
+};
« no previous file with comments | « ash/public/interfaces/BUILD.gn ('k') | ash/shell.h » ('j') | ash/tray_action/tray_action.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698