Commit e9ff6985 authored by kalman@chromium.org's avatar kalman@chromium.org

Use new ExtensionFunction::Error(..) error syntax in automation internal API.

R=aboxhall@chromium.org

Review URL: https://codereview.chromium.org/307983002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273751 0039d316-1c4b-4281-b951-d872f2087c98
parent a4158a34
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/permissions/permissions_data.h" #include "extensions/common/permissions/permissions_data.h"
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
...@@ -142,8 +141,8 @@ AutomationInternalEnableCurrentTabFunction::Run() { ...@@ -142,8 +141,8 @@ AutomationInternalEnableCurrentTabFunction::Run() {
return RespondNow(Error("Could not enable accessibility for active tab")); return RespondNow(Error("Could not enable accessibility for active tab"));
if (!CanRequestAutomation(GetExtension(), automation_info, contents)) { if (!CanRequestAutomation(GetExtension(), automation_info, contents)) {
return RespondNow(Error(ErrorUtils::FormatErrorMessage( return RespondNow(
kCannotRequestAutomationOnPage, contents->GetURL().spec()))); Error(kCannotRequestAutomationOnPage, contents->GetURL().spec()));
} }
AutomationWebContentsObserver::CreateForWebContents(contents); AutomationWebContentsObserver::CreateForWebContents(contents);
rwh->EnableTreeOnlyAccessibilityMode(); rwh->EnableTreeOnlyAccessibilityMode();
...@@ -182,8 +181,8 @@ AutomationInternalPerformActionFunction::Run() { ...@@ -182,8 +181,8 @@ AutomationInternalPerformActionFunction::Run() {
const content::WebContents* contents = const content::WebContents* contents =
content::WebContents::FromRenderViewHost(rvh); content::WebContents::FromRenderViewHost(rvh);
if (!CanRequestAutomation(GetExtension(), automation_info, contents)) { if (!CanRequestAutomation(GetExtension(), automation_info, contents)) {
return RespondNow(Error(ErrorUtils::FormatErrorMessage( return RespondNow(
kCannotRequestAutomationOnPage, contents->GetURL().spec()))); Error(kCannotRequestAutomationOnPage, contents->GetURL().spec()));
} }
} }
RenderWidgetHostActionAdapter adapter(rwh); RenderWidgetHostActionAdapter adapter(rwh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment