summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider_json.h
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-05 21:05:42 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-05 21:05:42 +0000
commitc54ab233b57b0c0cab2b814ef915767cece172bd (patch)
treead02d6bb9a271f5aae7a990e27f7a3d2b2dfe070 /chrome/browser/automation/automation_provider_json.h
parent9d996c067605d3cfc61a03afac405331802d5a67 (diff)
downloadchromium_src-c54ab233b57b0c0cab2b814ef915767cece172bd.zip
chromium_src-c54ab233b57b0c0cab2b814ef915767cece172bd.tar.gz
chromium_src-c54ab233b57b0c0cab2b814ef915767cece172bd.tar.bz2
Allow AutomationProvider to work with other render view containers besides
tabs, particularly extension bg pages, infobars, and popups. This is needed to enable WebDriver to work with these views. BUG=93571 TEST=none Review URL: http://codereview.chromium.org/8790003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider_json.h')
-rw-r--r--chrome/browser/automation/automation_provider_json.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/chrome/browser/automation/automation_provider_json.h b/chrome/browser/automation/automation_provider_json.h
index 1ea31db..0c1ba7d 100644
--- a/chrome/browser/automation/automation_provider_json.h
+++ b/chrome/browser/automation/automation_provider_json.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,8 +12,11 @@
#include "base/compiler_specific.h"
+class AutomationId;
class AutomationProvider;
class Browser;
+class Profile;
+class RenderViewHost;
class TabContents;
namespace base {
@@ -73,4 +76,22 @@ bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args,
TabContents** tab,
std::string* error) WARN_UNUSED_RESULT;
+// Gets an automation ID from the given value in the given dicitionary |args|.
+// Returns true on success and sets |id|. Otherwise, |error| will be set.
+bool GetAutomationIdFromJSONArgs(
+ base::DictionaryValue* args,
+ const std::string& key_name,
+ AutomationId* id,
+ std::string* error) WARN_UNUSED_RESULT;
+
+// Gets the render view specified by the given dictionary |args|. |args|
+// should contain a key 'view_id' which refers to an automation ID for the
+// render view. Returns true on success and sets |rvh|. Otherwise, |error|
+// will be set.
+bool GetRenderViewFromJSONArgs(
+ base::DictionaryValue* args,
+ Profile* profile,
+ RenderViewHost** rvh,
+ std::string* error) WARN_UNUSED_RESULT;
+
#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_