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 #include "components/proximity_auth/screenlock_bridge.h" | 5 #include "components/proximity_auth/screenlock_bridge.h" |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "components/proximity_auth/logging/logging.h" | 9 #include "components/proximity_auth/logging/logging.h" |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 ScreenlockBridge::UserPodCustomIconOptions::UserPodCustomIconOptions() | 55 ScreenlockBridge::UserPodCustomIconOptions::UserPodCustomIconOptions() |
56 : autoshow_tooltip_(false), | 56 : autoshow_tooltip_(false), |
57 hardlock_on_click_(false), | 57 hardlock_on_click_(false), |
58 is_trial_run_(false) { | 58 is_trial_run_(false) { |
59 } | 59 } |
60 | 60 |
61 ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() { | 61 ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() { |
62 } | 62 } |
63 | 63 |
64 scoped_ptr<base::DictionaryValue> | 64 std::unique_ptr<base::DictionaryValue> |
65 ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const { | 65 ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const { |
66 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); | 66 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue()); |
67 std::string icon_id = GetIdForIcon(icon_); | 67 std::string icon_id = GetIdForIcon(icon_); |
68 result->SetString("id", icon_id); | 68 result->SetString("id", icon_id); |
69 | 69 |
70 if (!tooltip_.empty()) { | 70 if (!tooltip_.empty()) { |
71 base::DictionaryValue* tooltip_options = new base::DictionaryValue(); | 71 base::DictionaryValue* tooltip_options = new base::DictionaryValue(); |
72 tooltip_options->SetString("text", tooltip_); | 72 tooltip_options->SetString("text", tooltip_); |
73 tooltip_options->SetBoolean("autoshow", autoshow_tooltip_); | 73 tooltip_options->SetBoolean("autoshow", autoshow_tooltip_); |
74 result->Set("tooltip", tooltip_options); | 74 result->Set("tooltip", tooltip_options); |
75 } | 75 } |
76 | 76 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 observers_.RemoveObserver(observer); | 175 observers_.RemoveObserver(observer); |
176 } | 176 } |
177 | 177 |
178 ScreenlockBridge::ScreenlockBridge() | 178 ScreenlockBridge::ScreenlockBridge() |
179 : lock_handler_(nullptr), focused_account_id_(EmptyAccountId()) {} | 179 : lock_handler_(nullptr), focused_account_id_(EmptyAccountId()) {} |
180 | 180 |
181 ScreenlockBridge::~ScreenlockBridge() { | 181 ScreenlockBridge::~ScreenlockBridge() { |
182 } | 182 } |
183 | 183 |
184 } // namespace proximity_auth | 184 } // namespace proximity_auth |
OLD | NEW |