| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap
i.h" | 5 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap
i.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/extensions/image_loader.h" | |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/common/extensions/api/screenlock_private.h" | 12 #include "chrome/common/extensions/api/screenlock_private.h" |
| 14 #include "extensions/browser/event_router.h" | 13 #include "extensions/browser/event_router.h" |
| 14 #include "extensions/browser/image_loader.h" |
| 15 #include "ui/gfx/image/image.h" | 15 #include "ui/gfx/image/image.h" |
| 16 | 16 |
| 17 namespace screenlock = extensions::api::screenlock_private; | 17 namespace screenlock = extensions::api::screenlock_private; |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 const char kNotLockedError[] = "Screen is not currently locked."; | 23 const char kNotLockedError[] = "Screen is not currently locked."; |
| 24 const char kInvalidIconError[] = "Invalid custom icon data."; | 24 const char kInvalidIconError[] = "Invalid custom icon data."; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 scoped_ptr<base::ListValue> args(new base::ListValue()); | 310 scoped_ptr<base::ListValue> args(new base::ListValue()); |
| 311 args->AppendString(screenlock::ToString(FromLockHandlerAuthType(auth_type))); | 311 args->AppendString(screenlock::ToString(FromLockHandlerAuthType(auth_type))); |
| 312 args->AppendString(value); | 312 args->AppendString(value); |
| 313 | 313 |
| 314 scoped_ptr<extensions::Event> event(new extensions::Event( | 314 scoped_ptr<extensions::Event> event(new extensions::Event( |
| 315 screenlock::OnAuthAttempted::kEventName, args.Pass())); | 315 screenlock::OnAuthAttempted::kEventName, args.Pass())); |
| 316 extensions::EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); | 316 extensions::EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); |
| 317 } | 317 } |
| 318 | 318 |
| 319 } // namespace extensions | 319 } // namespace extensions |
| OLD | NEW |