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

Unified Diff: chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h

Issue 2638903003: Updates touch calibration API and plumbs through the native touch calibration method (Closed)
Patch Set: Resolving comments Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h
diff --git a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h
index 4f51cd4288237fbf04b6aba4f837398107e2c0cf..75c67295d9c723b11a52ad53be60a5263865fe03 100644
--- a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h
+++ b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h
@@ -31,6 +31,7 @@ class TouchCalibratorController : public ui::EventHandler,
public:
using CalibrationPointPairQuad =
display::TouchCalibrationData::CalibrationPointPairQuad;
+ using TouchCalibrationCallback = base::Callback<void(bool)>;
static const base::TimeDelta kTouchIntervalThreshold;
@@ -47,6 +48,10 @@ class TouchCalibratorController : public ui::EventHandler,
// Starts the calibration process for the given |target_display|.
void StartCalibration(const display::Display& target_display);
+ // Adds a callback that will be called once the calibration has been
+ // completed. This should be called before |StartCalibration()|.
+ void AddCallback(const TouchCalibrationCallback& callback);
Reilly Grant (use Gerrit) 2017/01/19 02:41:46 Why not pass this callback to StartCalibration()?
malaykeshav 2017/01/19 06:10:38 I was thinking of making the callback optional in
+
// Stops any ongoing calibration process.
void StopCalibration();
@@ -78,6 +83,10 @@ class TouchCalibratorController : public ui::EventHandler,
// touch input point pairs that will be used for calibration.
CalibrationPointPairQuad touch_point_quad_;
+ // A callback to be called when touch calibration completes.
+ TouchCalibrationCallback callback_;
+ bool has_callback_;
Reilly Grant (use Gerrit) 2017/01/19 02:41:46 This field is unnecessary. callback_.is_null() wil
malaykeshav 2017/01/19 06:10:38 Done
+
DISALLOW_COPY_AND_ASSIGN(TouchCalibratorController);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698