OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_TRAY_ACTION_TRAY_ACTION_H_ | 5 #ifndef ASH_TRAY_ACTION_TRAY_ACTION_H_ |
6 #define ASH_TRAY_ACTION_TRAY_ACTION_H_ | 6 #define ASH_TRAY_ACTION_TRAY_ACTION_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/public/interfaces/tray_action.mojom.h" | 9 #include "ash/public/interfaces/tray_action.mojom.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 ~TrayAction() override; | 30 ~TrayAction() override; |
31 | 31 |
32 void AddObserver(TrayActionObserver* observer); | 32 void AddObserver(TrayActionObserver* observer); |
33 void RemoveObserver(TrayActionObserver* observer); | 33 void RemoveObserver(TrayActionObserver* observer); |
34 | 34 |
35 void BindRequest(mojom::TrayActionRequest request); | 35 void BindRequest(mojom::TrayActionRequest request); |
36 | 36 |
37 // Gets last known handler state for the lock screen note action. | 37 // Gets last known handler state for the lock screen note action. |
38 // It will return kNotAvailable if an action handler has not been set using | 38 // It will return kNotAvailable if an action handler has not been set using |
39 // |SetClient|. | 39 // |SetClient|. |
40 mojom::TrayActionState GetLockScreenNoteState(); | 40 mojom::TrayActionState GetLockScreenNoteState() const; |
oshima
2017/05/25 19:49:59
thanks
| |
41 | |
42 // Helper method for determining if lock screen not action is in active state. | |
43 bool IsLockScreenNoteActive() const; | |
41 | 44 |
42 // If the client is set, sends it a request to handle the lock screen note | 45 // If the client is set, sends it a request to handle the lock screen note |
43 // action. | 46 // action. |
44 void RequestNewLockScreenNote(); | 47 void RequestNewLockScreenNote(); |
45 | 48 |
46 // mojom::TrayAction: | 49 // mojom::TrayAction: |
47 void SetClient(mojom::TrayActionClientPtr action_handler, | 50 void SetClient(mojom::TrayActionClientPtr action_handler, |
48 mojom::TrayActionState lock_screen_note_state) override; | 51 mojom::TrayActionState lock_screen_note_state) override; |
49 void UpdateLockScreenNoteState(mojom::TrayActionState state) override; | 52 void UpdateLockScreenNoteState(mojom::TrayActionState state) override; |
50 | 53 |
(...skipping 11 matching lines...) Expand all Loading... | |
62 mojo::BindingSet<mojom::TrayAction> bindings_; | 65 mojo::BindingSet<mojom::TrayAction> bindings_; |
63 | 66 |
64 mojom::TrayActionClientPtr tray_action_client_; | 67 mojom::TrayActionClientPtr tray_action_client_; |
65 | 68 |
66 DISALLOW_COPY_AND_ASSIGN(TrayAction); | 69 DISALLOW_COPY_AND_ASSIGN(TrayAction); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace ash | 72 } // namespace ash |
70 | 73 |
71 #endif // ASH_TRAY_ACTION_TRAY_ACTION_H_ | 74 #endif // ASH_TRAY_ACTION_TRAY_ACTION_H_ |
OLD | NEW |