Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: chrome/browser/extensions/api/document_scan/document_scan_interface_nonchromeos.cc

Issue 286933006: Implement a JavaScript API for document scanning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Starting over. This used to be 286933006 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/document_scan/document_scan_interface_nonchromeos.cc
diff --git a/chrome/browser/extensions/api/document_scan/document_scan_interface_nonchromeos.cc b/chrome/browser/extensions/api/document_scan/document_scan_interface_nonchromeos.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cd210372f59ded0765f2ec8305f25d3f21fb57d5
--- /dev/null
+++ b/chrome/browser/extensions/api/document_scan/document_scan_interface_nonchromeos.cc
@@ -0,0 +1,44 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/api/document_scan/document_scan_interface.h"
+
+namespace {
+
+const char kScanFunctionNotImplementedError[] = "Scan function not implemented";
+
+} // namespace
+
+namespace extensions {
+
+namespace api {
+
+class DocumentScanInterfaceImpl : public DocumentScanInterface {
+ public:
+ DocumentScanInterfaceImpl() {}
+ virtual ~DocumentScanInterfaceImpl() {}
+
+ virtual void ListScanners(
+ const ListScannersResultsCallback& callback) override {
+ callback.Run(std::vector<ScannerDescription> (), "");
+ }
+ virtual void Scan(const std::string& scanner_name,
+ ScanMode mode,
+ int resolution_dpi,
+ const ScanResultsCallback& callback) override {
+ callback.Run("", "", kScanFunctionNotImplementedError);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceImpl);
+};
+
+// static
+DocumentScanInterface *DocumentScanInterface::CreateInstance() {
+ return new DocumentScanInterfaceImpl();
+}
+
+} // namespace api
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698