| 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 044e41773b7b3bffc6acae3f3777eda6373f03c5..6ada5f161f5d45f507945c640b2352421000688f 100644
|
| --- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
|
| +++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc
|
| @@ -20,6 +20,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| +#include "chrome/common/extensions/api/automation_api_constants.h"
|
| #include "chrome/common/extensions/api/automation_internal.h"
|
| #include "chrome/common/extensions/chrome_extension_messages.h"
|
| #include "chrome/common/extensions/manifest_handlers/automation.h"
|
| @@ -51,7 +52,6 @@ namespace extensions {
|
|
|
| namespace {
|
|
|
| -const int kDesktopTreeID = 0;
|
| const char kCannotRequestAutomationOnPage[] =
|
| "Cannot request automation tree on url \"*\". "
|
| "Extension manifest must request permission to access this host.";
|
| @@ -336,7 +336,7 @@ AutomationInternalPerformActionFunction::Run() {
|
| std::unique_ptr<Params> params(Params::Create(*args_));
|
| EXTENSION_FUNCTION_VALIDATE(params.get());
|
|
|
| - if (params->args.tree_id == kDesktopTreeID) {
|
| + if (params->args.tree_id == api::automation::kDesktopTreeID) {
|
| #if defined(USE_AURA)
|
| return RouteActionToAdapter(params.get(),
|
| AutomationManagerAura::GetInstance());
|
| @@ -433,7 +433,7 @@ AutomationInternalQuerySelectorFunction::Run() {
|
| std::unique_ptr<Params> params(Params::Create(*args_));
|
| EXTENSION_FUNCTION_VALIDATE(params.get());
|
|
|
| - if (params->args.tree_id == kDesktopTreeID) {
|
| + if (params->args.tree_id == api::automation::kDesktopTreeID) {
|
| return RespondNow(
|
| Error("domQuerySelector queries may not be used on the desktop."));
|
| }
|
|
|