OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/extensions/api/automation_internal/automation_internal_
api.h" | 5 #include "chrome/browser/extensions/api/automation_internal/automation_internal_
api.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 case api::automation_internal::ACTION_TYPE_SETACCESSIBILITYFOCUS: { | 386 case api::automation_internal::ACTION_TYPE_SETACCESSIBILITYFOCUS: { |
387 action->action = ui::AX_ACTION_SET_ACCESSIBILITY_FOCUS; | 387 action->action = ui::AX_ACTION_SET_ACCESSIBILITY_FOCUS; |
388 break; | 388 break; |
389 } | 389 } |
390 case api::automation_internal:: | 390 case api::automation_internal:: |
391 ACTION_TYPE_SETSEQUENTIALFOCUSNAVIGATIONSTARTINGPOINT: { | 391 ACTION_TYPE_SETSEQUENTIALFOCUSNAVIGATIONSTARTINGPOINT: { |
392 action->action = | 392 action->action = |
393 ui::AX_ACTION_SET_SEQUENTIAL_FOCUS_NAVIGATION_STARTING_POINT; | 393 ui::AX_ACTION_SET_SEQUENTIAL_FOCUS_NAVIGATION_STARTING_POINT; |
394 break; | 394 break; |
395 } | 395 } |
| 396 case api::automation_internal::ACTION_TYPE_CUSTOMACTION: { |
| 397 api::automation_internal::PerformCustomActionParams |
| 398 perform_custom_action_params; |
| 399 EXTENSION_FUNCTION_VALIDATE( |
| 400 api::automation_internal::PerformCustomActionParams::Populate( |
| 401 params->opt_args.additional_properties, |
| 402 &perform_custom_action_params)); |
| 403 action->action = ui::AX_ACTION_CUSTOM_ACTION; |
| 404 action->custom_action_id = perform_custom_action_params.custom_action_id; |
| 405 break; |
| 406 } |
396 default: | 407 default: |
397 NOTREACHED(); | 408 NOTREACHED(); |
398 } | 409 } |
399 return RespondNow(NoArguments()); | 410 return RespondNow(NoArguments()); |
400 } | 411 } |
401 | 412 |
402 ExtensionFunction::ResponseAction | 413 ExtensionFunction::ResponseAction |
403 AutomationInternalPerformActionFunction::Run() { | 414 AutomationInternalPerformActionFunction::Run() { |
404 const AutomationInfo* automation_info = AutomationInfo::Get(extension()); | 415 const AutomationInfo* automation_info = AutomationInfo::Get(extension()); |
405 EXTENSION_FUNCTION_VALIDATE(automation_info && automation_info->interact); | 416 EXTENSION_FUNCTION_VALIDATE(automation_info && automation_info->interact); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 int result_acc_obj_id) { | 535 int result_acc_obj_id) { |
525 if (!error.empty()) { | 536 if (!error.empty()) { |
526 Respond(Error(error)); | 537 Respond(Error(error)); |
527 return; | 538 return; |
528 } | 539 } |
529 | 540 |
530 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id))); | 541 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id))); |
531 } | 542 } |
532 | 543 |
533 } // namespace extensions | 544 } // namespace extensions |
OLD | NEW |