| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
| 6 #define COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 6 #define COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "ash/public/interfaces/lock_screen.mojom.h" |
| 11 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 14 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 15 #include "base/values.h" | 16 #include "base/values.h" |
| 16 #include "components/signin/core/account_id/account_id.h" | 17 #include "components/signin/core/account_id/account_id.h" |
| 17 | 18 |
| 18 namespace proximity_auth { | 19 namespace proximity_auth { |
| 19 | 20 |
| 20 // ScreenlockBridge brings together the screenLockPrivate API and underlying | 21 // ScreenlockBridge brings together the screenLockPrivate API and underlying |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 // shown on a user's screen lock pod next to the input field. | 45 // shown on a user's screen lock pod next to the input field. |
| 45 class UserPodCustomIconOptions { | 46 class UserPodCustomIconOptions { |
| 46 public: | 47 public: |
| 47 UserPodCustomIconOptions(); | 48 UserPodCustomIconOptions(); |
| 48 ~UserPodCustomIconOptions(); | 49 ~UserPodCustomIconOptions(); |
| 49 | 50 |
| 50 // Converts parameters to a dictionary values that can be sent to the | 51 // Converts parameters to a dictionary values that can be sent to the |
| 51 // screenlock web UI. | 52 // screenlock web UI. |
| 52 std::unique_ptr<base::DictionaryValue> ToDictionaryValue() const; | 53 std::unique_ptr<base::DictionaryValue> ToDictionaryValue() const; |
| 53 | 54 |
| 55 // Converts parameters to a mojo struct that can be sent to the |
| 56 // screenlock view-based UI. |
| 57 ash::mojom::UserPodCustomIconOptionsPtr ToUserPodCustomIconOptionsPtr() |
| 58 const; |
| 59 |
| 54 // Sets the icon that should be shown in the UI. | 60 // Sets the icon that should be shown in the UI. |
| 55 void SetIcon(UserPodCustomIcon icon); | 61 void SetIcon(UserPodCustomIcon icon); |
| 56 | 62 |
| 57 // Sets the icon tooltip. If |autoshow| is set the tooltip is automatically | 63 // Sets the icon tooltip. If |autoshow| is set the tooltip is automatically |
| 58 // shown with the icon. | 64 // shown with the icon. |
| 59 void SetTooltip(const base::string16& tooltip, bool autoshow); | 65 void SetTooltip(const base::string16& tooltip, bool autoshow); |
| 60 | 66 |
| 61 // Sets the accessibility label of the icon. If this attribute is not | 67 // Sets the accessibility label of the icon. If this attribute is not |
| 62 // provided, then the tooltip will be used. | 68 // provided, then the tooltip will be used. |
| 63 void SetAriaLabel(const base::string16& aria_label); | 69 void SetAriaLabel(const base::string16& aria_label); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // The last focused user's id. | 188 // The last focused user's id. |
| 183 AccountId focused_account_id_; | 189 AccountId focused_account_id_; |
| 184 base::ObserverList<Observer, true> observers_; | 190 base::ObserverList<Observer, true> observers_; |
| 185 | 191 |
| 186 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 192 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
| 187 }; | 193 }; |
| 188 | 194 |
| 189 } // namespace proximity_auth | 195 } // namespace proximity_auth |
| 190 | 196 |
| 191 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 197 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
| OLD | NEW |