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

Side by Side 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 unified diff | Download patch
OLDNEW
(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 // An action handler state.
8 enum TrayActionState {
9 // The client does not support the action.
10 kNotSupported,
11
12 // The client supports the action, but the action cannot be handled at the
13 // moment, for example due to user session not being locked.
14 kNotAvailable,
15
16 // The client supports the action and is not currently handling the action.
17 kAvailable,
18
19 // The client received the request for the action and it is launching the
20 // flow to handle it.
21 kLaunching,
22
23 // The client is currently handling the action.
24 kActive,
25
26 // The client is currently handling the action, but in background (e.g.
27 // handler window for lock screen action was moved to the background to
28 // surfeace user sign-in UI).
James Cook 2017/05/05 02:55:44 nit: surface Or rewrite as: "(e.g. the handler wi
tbarzic 2017/05/05 04:46:26 Done.
29 kBackground,
30 };
31
32 // Used by a client (e.g. Chrome) to notify ash of tray action handlers’
33 // state changes.
James Cook 2017/05/05 02:55:44 nit: I would also say what a tray action is. For e
tbarzic 2017/05/05 04:46:26 Done.
34 interface TrayAction {
James Cook 2017/05/05 02:55:44 optional: This API is OK for now, but in the long
tbarzic 2017/05/05 04:46:26 Yes, I think this would be a good approach when we
35 // Sets the client to be used to handle action requests.
36 // |lock_screen_note_state|: The current lock screen note action state
37 // associated with the client.
38 SetClient(TrayActionClient client, TrayActionState lock_screen_note_state);
39
40 // Updates action state for the lock screen note action. If called with no
41 // client set, the state change will not take effect until a client is set.
42 // Null client is equivalent to kNoteSupported state.
James Cook 2017/05/05 02:55:44 kNotSupported
tbarzic 2017/05/05 04:46:26 Done.
43 UpdateLockScreenNoteState(TrayActionState state);
44 };
45
46 // Used by ash to request Chrome to handle an action.
47 interface TrayActionClient {
48 // Requests a lock screen note action to be handled.
49 RequestNewLockScreenNote();
50 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698