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-03-08 00:06:28 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 00:06:28 +0000
commit5fb586a686da09db00362bebdc282b0c3fae0ec5 (patch)
treede315ea045043ac98538590bb7eb78918da3718e /chrome/browser/automation/automation_provider_json.h
parentae7ba1ee25011a3158ecf73e3014699fa8dc7406 (diff)
downloadchromium_src-5fb586a686da09db00362bebdc282b0c3fae0ec5.zip
chromium_src-5fb586a686da09db00362bebdc282b0c3fae0ec5.tar.gz
chromium_src-5fb586a686da09db00362bebdc282b0c3fae0ec5.tar.bz2
Convert ChromeDriver to use only the JSON automation interface.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6614023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider_json.h')
-rw-r--r--chrome/browser/automation/automation_provider_json.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/chrome/browser/automation/automation_provider_json.h b/chrome/browser/automation/automation_provider_json.h
index 26b8581..0e23f86 100644
--- a/chrome/browser/automation/automation_provider_json.h
+++ b/chrome/browser/automation/automation_provider_json.h
@@ -10,8 +10,13 @@
#include <string>
-class Value;
+#include "base/compiler_specific.h"
+
class AutomationProvider;
+class Browser;
+class DictionaryValue;
+class TabContents;
+class Value;
namespace IPC {
class Message;
@@ -40,4 +45,29 @@ class AutomationJSONReply {
IPC::Message* message_;
};
+// Gets the browser specified by the given dictionary |args|. |args| should
+// contain a key 'windex' which refers to the index of the browser. Returns
+// true on success and sets |browser|. Otherwise, |error| will be set.
+bool GetBrowserFromJSONArgs(DictionaryValue* args,
+ Browser** browser,
+ std::string* error) WARN_UNUSED_RESULT;
+
+// Gets the tab specified by the given dictionary |args|. |args| should
+// contain a key 'windex' which refers to the index of the parent browser,
+// and a key 'tab_index' which refers to the index of the tab in that browser.
+// Returns true on success and sets |tab|. Otherwise, |error| will be set.
+bool GetTabFromJSONArgs(DictionaryValue* args,
+ TabContents** tab,
+ std::string* error) WARN_UNUSED_RESULT;
+
+// Gets the browser and tab specified by the given dictionary |args|. |args|
+// should contain a key 'windex' which refers to the index of the browser and
+// a key 'tab_index' which refers to the index of the tab in that browser.
+// Returns true on success and sets |browser| and |tab|. Otherwise, |error|
+// will be set.
+bool GetBrowserAndTabFromJSONArgs(DictionaryValue* args,
+ Browser** browser,
+ TabContents** tab,
+ std::string* error) WARN_UNUSED_RESULT;
+
#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_