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

Unified Diff: chrome/browser/automation/automation_provider_json.h

Issue 6614023: Convert ChromeDriver to use only the JSON automation interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Pawel's additional comments Created 9 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider_json.h
diff --git a/chrome/browser/automation/automation_provider_json.h b/chrome/browser/automation/automation_provider_json.h
index 26b85810b415139f1a6002adca6b353da83a5b9e..0e23f86d27899d51bce9915267a317ce04d824b7 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_
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698