Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1001)

Unified Diff: chrome/browser/extensions/api/automation_internal/automation_internal_api.cc

Issue 2372253003: Account for device scale factor in automation API bounding boxes. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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."));
}

Powered by Google App Engine
This is Rietveld 408576698