OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/login/camera.h" | 5 #include "chrome/browser/chromeos/login/camera.h" |
6 | 6 |
7 #include <asm/types.h> // for videodev2.h | 7 #include <asm/types.h> // for videodev2.h |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> // low-level i/o | 9 #include <fcntl.h> // low-level i/o |
10 #include <linux/videodev2.h> | 10 #include <linux/videodev2.h> |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "base/string_util.h" | 25 #include "base/string_util.h" |
26 #include "base/stringprintf.h" | 26 #include "base/stringprintf.h" |
27 #include "base/threading/thread.h" | 27 #include "base/threading/thread.h" |
28 #include "base/time.h" | 28 #include "base/time.h" |
29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
30 #include "skia/ext/image_operations.h" | 30 #include "skia/ext/image_operations.h" |
31 #include "third_party/skia/include/core/SkBitmap.h" | 31 #include "third_party/skia/include/core/SkBitmap.h" |
32 #include "third_party/skia/include/core/SkColorPriv.h" | 32 #include "third_party/skia/include/core/SkColorPriv.h" |
33 #include "ui/gfx/size.h" | 33 #include "ui/gfx/size.h" |
34 | 34 |
| 35 using content::BrowserThread; |
| 36 |
35 namespace chromeos { | 37 namespace chromeos { |
36 | 38 |
37 namespace { | 39 namespace { |
38 | 40 |
39 // Logs errno number and its text. | 41 // Logs errno number and its text. |
40 void log_errno(const std::string& message) { | 42 void log_errno(const std::string& message) { |
41 LOG(ERROR) << message << " errno: " << errno << ", " << strerror(errno); | 43 LOG(ERROR) << message << " errno: " << errno << ", " << strerror(errno); |
42 } | 44 } |
43 | 45 |
44 // Helpful wrapper around ioctl that retries it upon failure in cases when | 46 // Helpful wrapper around ioctl that retries it upon failure in cases when |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 const base::Closure& task, | 587 const base::Closure& task, |
586 int64 delay_in_ms) { | 588 int64 delay_in_ms) { |
587 base::AutoLock lock(thread_lock_); | 589 base::AutoLock lock(thread_lock_); |
588 if (!thread_) | 590 if (!thread_) |
589 return; | 591 return; |
590 DCHECK(thread_->IsRunning()); | 592 DCHECK(thread_->IsRunning()); |
591 thread_->message_loop()->PostDelayedTask(from_here, task, delay_in_ms); | 593 thread_->message_loop()->PostDelayedTask(from_here, task, delay_in_ms); |
592 } | 594 } |
593 | 595 |
594 } // namespace chromeos | 596 } // namespace chromeos |
OLD | NEW |