OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "extensions/browser/api/webcam_private/visca_webcam.h" | 5 #include "extensions/browser/api/webcam_private/visca_webcam.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> |
9 | 10 |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
14 | 15 |
15 using content::BrowserThread; | 16 using content::BrowserThread; |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 } | 483 } |
483 if (zoom) { | 484 if (zoom) { |
484 // Set the default zoom value to 100 to be consistent with V4l2 webcam. | 485 // Set the default zoom value to 100 to be consistent with V4l2 webcam. |
485 const int kDefaultZoom = 100; | 486 const int kDefaultZoom = 100; |
486 SetZoom(kDefaultZoom, callback); | 487 SetZoom(kDefaultZoom, callback); |
487 } | 488 } |
488 } | 489 } |
489 | 490 |
490 void ViscaWebcam::OpenForTesting( | 491 void ViscaWebcam::OpenForTesting( |
491 scoped_ptr<SerialConnection> serial_connection) { | 492 scoped_ptr<SerialConnection> serial_connection) { |
492 serial_connection_ = serial_connection.Pass(); | 493 serial_connection_ = std::move(serial_connection); |
493 } | 494 } |
494 | 495 |
495 SerialConnection* ViscaWebcam::GetSerialConnectionForTesting() { | 496 SerialConnection* ViscaWebcam::GetSerialConnectionForTesting() { |
496 return serial_connection_.get(); | 497 return serial_connection_.get(); |
497 } | 498 } |
498 | 499 |
499 } // namespace extensions | 500 } // namespace extensions |
OLD | NEW |