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 "extensions/browser/api/document_scan/document_scan_interface_chromeos.
h" | 5 #include "extensions/browser/api/document_scan/document_scan_interface_chromeos.
h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "chromeos/dbus/dbus_thread_manager.h" | 9 #include "chromeos/dbus/dbus_thread_manager.h" |
10 #include "chromeos/dbus/lorgnette_manager_client.h" | 10 #include "chromeos/dbus/lorgnette_manager_client.h" |
11 #include "third_party/cros_system_api/dbus/service_constants.h" | 11 #include "third_party/cros_system_api/dbus/service_constants.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const char kImageScanFailedError[] = "Image scan failed"; | 15 const char kImageScanFailedError[] = "Image scan failed"; |
16 const char kScannerImageMimeTypePng[] = "image/png"; | 16 const char kScannerImageMimeTypePng[] = "image/png"; |
17 const char kPngImageDataUrlPrefix[] = "data:image/png;base64,"; | 17 const char kPngImageDataUrlPrefix[] = "data:image/png;base64,"; |
18 | 18 |
19 } // namespace | 19 } // namespace |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 | 22 |
23 namespace core_api { | 23 namespace api { |
24 | 24 |
25 DocumentScanInterfaceChromeos::DocumentScanInterfaceChromeos() | 25 DocumentScanInterfaceChromeos::DocumentScanInterfaceChromeos() |
26 : lorgnette_manager_client_(nullptr) { | 26 : lorgnette_manager_client_(nullptr) { |
27 } | 27 } |
28 | 28 |
29 DocumentScanInterfaceChromeos::~DocumentScanInterfaceChromeos() { | 29 DocumentScanInterfaceChromeos::~DocumentScanInterfaceChromeos() { |
30 } | 30 } |
31 | 31 |
32 void DocumentScanInterfaceChromeos::ListScanners( | 32 void DocumentScanInterfaceChromeos::ListScanners( |
33 const ListScannersResultsCallback& callback) { | 33 const ListScannersResultsCallback& callback) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 CHECK(lorgnette_manager_client_); | 119 CHECK(lorgnette_manager_client_); |
120 } | 120 } |
121 return lorgnette_manager_client_; | 121 return lorgnette_manager_client_; |
122 } | 122 } |
123 | 123 |
124 // static | 124 // static |
125 DocumentScanInterface* DocumentScanInterface::CreateInstance() { | 125 DocumentScanInterface* DocumentScanInterface::CreateInstance() { |
126 return new DocumentScanInterfaceChromeos(); | 126 return new DocumentScanInterfaceChromeos(); |
127 } | 127 } |
128 | 128 |
129 } // namespace core_api | 129 } // namespace api |
130 | 130 |
131 } // namespace extensions | 131 } // namespace extensions |
OLD | NEW |