| 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 "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 15 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 16 #include "base/values.h" | 15 #include "base/values.h" |
| 17 #include "components/signin/core/account_id/account_id.h" | 16 #include "components/signin/core/account_id/account_id.h" |
| 18 | 17 |
| 19 namespace proximity_auth { | 18 namespace proximity_auth { |
| 20 | 19 |
| 21 // ScreenlockBridge brings together the screenLockPrivate API and underlying | 20 // ScreenlockBridge brings together the screenLockPrivate API and underlying |
| 22 // support. On ChromeOS, it delegates calls to the ScreenLocker. On other | 21 // support. On ChromeOS, it delegates calls to the ScreenLocker. On other |
| 23 // platforms, it delegates calls to UserManagerUI (and friends). | 22 // platforms, it delegates calls to UserManagerUI (and friends). |
| (...skipping 19 matching lines...) Expand all Loading... |
| 43 | 42 |
| 44 // Class containing parameters describing the custom icon that should be | 43 // Class containing parameters describing the custom icon that should be |
| 45 // shown on a user's screen lock pod next to the input field. | 44 // shown on a user's screen lock pod next to the input field. |
| 46 class UserPodCustomIconOptions { | 45 class UserPodCustomIconOptions { |
| 47 public: | 46 public: |
| 48 UserPodCustomIconOptions(); | 47 UserPodCustomIconOptions(); |
| 49 ~UserPodCustomIconOptions(); | 48 ~UserPodCustomIconOptions(); |
| 50 | 49 |
| 51 // Converts parameters to a dictionary values that can be sent to the | 50 // Converts parameters to a dictionary values that can be sent to the |
| 52 // screenlock web UI. | 51 // screenlock web UI. |
| 53 scoped_ptr<base::DictionaryValue> ToDictionaryValue() const; | 52 std::unique_ptr<base::DictionaryValue> ToDictionaryValue() const; |
| 54 | 53 |
| 55 // Sets the icon that should be shown in the UI. | 54 // Sets the icon that should be shown in the UI. |
| 56 void SetIcon(UserPodCustomIcon icon); | 55 void SetIcon(UserPodCustomIcon icon); |
| 57 | 56 |
| 58 // Sets the icon tooltip. If |autoshow| is set the tooltip is automatically | 57 // Sets the icon tooltip. If |autoshow| is set the tooltip is automatically |
| 59 // shown with the icon. | 58 // shown with the icon. |
| 60 void SetTooltip(const base::string16& tooltip, bool autoshow); | 59 void SetTooltip(const base::string16& tooltip, bool autoshow); |
| 61 | 60 |
| 62 // Sets the accessibility label of the icon. If this attribute is not | 61 // Sets the accessibility label of the icon. If this attribute is not |
| 63 // provided, then the tooltip will be used. | 62 // provided, then the tooltip will be used. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // The last focused user's id. | 182 // The last focused user's id. |
| 184 AccountId focused_account_id_; | 183 AccountId focused_account_id_; |
| 185 base::ObserverList<Observer, true> observers_; | 184 base::ObserverList<Observer, true> observers_; |
| 186 | 185 |
| 187 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 186 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
| 188 }; | 187 }; |
| 189 | 188 |
| 190 } // namespace proximity_auth | 189 } // namespace proximity_auth |
| 191 | 190 |
| 192 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ | 191 #endif // COMPONENTS_PROXIMITY_AUTH_SCREENLOCK_BRIDGE_H_ |
| OLD | NEW |