Chromium Code Reviews| 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); |
| }; |