Commit ad2b36c1 authored by Jesse Schettler's avatar Jesse Schettler Committed by Commit Bot

scanning: Set scan request settings all at once

Instead of manually setting each scan setting in the StartScanRequest of
LorgnetteManagerClient::StartScan(), set them all at once using the
given ScanSettings proto. This will eliminate the need to manually set
additional settings that get added to the proto in the future.

Bug: None
Change-Id: I05f734c630beed8e9cfb9a7a5359c9441d5f0502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432310Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Jesse Schettler <jschettler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811353}
parent 7ab26af9
...@@ -74,10 +74,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient { ...@@ -74,10 +74,7 @@ class LorgnetteManagerClientImpl : public LorgnetteManagerClient {
progress_callback) override { progress_callback) override {
lorgnette::StartScanRequest request; lorgnette::StartScanRequest request;
request.set_device_name(device_name); request.set_device_name(device_name);
request.mutable_settings()->set_color_mode(settings.color_mode()); *request.mutable_settings() = settings;
request.mutable_settings()->set_resolution(settings.resolution());
lorgnette::DocumentSource source = settings.source();
request.mutable_settings()->set_allocated_source(&source);
dbus::MethodCall method_call(lorgnette::kManagerServiceInterface, dbus::MethodCall method_call(lorgnette::kManagerServiceInterface,
lorgnette::kStartScanMethod); lorgnette::kStartScanMethod);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment