| Index: chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
|
| diff --git a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
|
| index 40e184bbf3b64d5776b523af8abb94ca9feb063d..acac0b48bb2cad668aa32df4337d441ebd9e6f6f 100644
|
| --- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
|
| +++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
|
| @@ -17,6 +17,7 @@
|
| #include "chrome/common/extensions/api/automation_internal.h"
|
| #include "chrome/common/extensions/manifest_handlers/automation.h"
|
| #include "content/public/browser/ax_event_notification_details.h"
|
| +#include "content/public/browser/browser_accessibility_state.h"
|
| #include "content/public/browser/render_frame_host.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_widget_host.h"
|
| @@ -167,7 +168,26 @@ AutomationInternalEnableTabFunction::Run() {
|
| return RespondNow(
|
| ArgumentList(api::automation_internal::EnableTab::Results::Create(
|
| rfh->GetProcess()->GetID(), rfh->GetRoutingID())));
|
| - }
|
| +}
|
| +
|
| +ExtensionFunction::ResponseAction
|
| +AutomationInternalEnableFrameFunction::Run() {
|
| + using api::automation_internal::EnableFrame::Params;
|
| + scoped_ptr<Params> params(Params::Create(*args_));
|
| + EXTENSION_FUNCTION_VALIDATE(params.get());
|
| + content::RenderFrameHost* rfh =
|
| + content::RenderFrameHost::FromID(params->process_id,
|
| + params->routing_id);
|
| + if (!rfh)
|
| + return RespondNow(Error("unable to load tab"));
|
| +
|
| + content::WebContents* contents =
|
| + content::WebContents::FromRenderFrameHost(rfh);
|
| + AutomationWebContentsObserver::CreateForWebContents(contents);
|
| + contents->EnableTreeOnlyAccessibilityMode();
|
| +
|
| + return RespondNow(NoArguments());
|
| +}
|
|
|
| ExtensionFunction::ResponseAction
|
| AutomationInternalPerformActionFunction::Run() {
|
|
|