| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/system_display/system_display_api.h" | 5 #include "extensions/browser/api/system_display/system_display_api.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 OnCalibrationComplete, | 285 OnCalibrationComplete, |
| 286 this))) { | 286 this))) { |
| 287 return RespondNow(Error(error)); | 287 return RespondNow(Error(error)); |
| 288 } | 288 } |
| 289 return RespondLater(); | 289 return RespondLater(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void SystemDisplayShowNativeTouchCalibrationFunction::OnCalibrationComplete( | 292 void SystemDisplayShowNativeTouchCalibrationFunction::OnCalibrationComplete( |
| 293 bool success) { | 293 bool success) { |
| 294 if (success) | 294 if (success) |
| 295 Respond(OneArgument(base::MakeUnique<base::FundamentalValue>(true))); | 295 Respond(OneArgument(base::MakeUnique<base::Value>(true))); |
| 296 else | 296 else |
| 297 Respond(Error(kTouchCalibrationError)); | 297 Respond(Error(kTouchCalibrationError)); |
| 298 } | 298 } |
| 299 | 299 |
| 300 ExtensionFunction::ResponseAction | 300 ExtensionFunction::ResponseAction |
| 301 SystemDisplayStartCustomTouchCalibrationFunction::Run() { | 301 SystemDisplayStartCustomTouchCalibrationFunction::Run() { |
| 302 std::unique_ptr<display::StartCustomTouchCalibration::Params> params( | 302 std::unique_ptr<display::StartCustomTouchCalibration::Params> params( |
| 303 display::StartCustomTouchCalibration::Params::Create(*args_)); | 303 display::StartCustomTouchCalibration::Params::Create(*args_)); |
| 304 | 304 |
| 305 std::string error; | 305 std::string error; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 336 std::string error; | 336 std::string error; |
| 337 if (DisplayInfoProvider::Get()->IsNativeTouchCalibrationActive(&error)) | 337 if (DisplayInfoProvider::Get()->IsNativeTouchCalibrationActive(&error)) |
| 338 return RespondNow(Error(error)); | 338 return RespondNow(Error(error)); |
| 339 | 339 |
| 340 if (!DisplayInfoProvider::Get()->ClearTouchCalibration(params->id, &error)) | 340 if (!DisplayInfoProvider::Get()->ClearTouchCalibration(params->id, &error)) |
| 341 return RespondNow(Error(error)); | 341 return RespondNow(Error(error)); |
| 342 return RespondNow(NoArguments()); | 342 return RespondNow(NoArguments()); |
| 343 } | 343 } |
| 344 | 344 |
| 345 } // namespace extensions | 345 } // namespace extensions |
| OLD | NEW |