Cookie commands for the webdriver protocol

Implements the following URLs for WebDriver:
/session/:sessionId/cookie (GET POST DELETE)
/session/:sessionId/cookie/:name (DELETE)

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6330012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75029 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/test/webdriver/automation.h b/chrome/test/webdriver/automation.h
index ac7d405..1d97bc2 100644
--- a/chrome/test/webdriver/automation.h
+++ b/chrome/test/webdriver/automation.h
@@ -14,6 +14,8 @@
 #include "chrome/test/ui/ui_test.h"
 #include "ui/base/keycodes/keyboard_codes.h"
 
+class GURL;
+
 namespace webdriver {
 
 struct WebKeyEvent {
@@ -37,6 +39,8 @@
 
 // Creates and controls the Chrome instance.
 // This class should be created and accessed on a single thread.
+// Note: All member functions are void because they are invoked
+// by posting a task from NewRunnableMethod.
 // TODO(phajdan.jr):  Abstract UITestBase classes, see:
 // http://code.google.com/p/chromium/issues/detail?id=56865
 class Automation : private UITestBase {
@@ -67,7 +71,14 @@
   void GoBack(bool* success);
   void Reload(bool* success);
   void GetURL(std::string* url, bool* success);
+  void GetGURL(GURL* gurl, bool* success);
   void GetTabTitle(std::string* tab_title, bool* success);
+  void GetCookies(const GURL& gurl, std::string* cookies, bool* success);
+  void GetCookieByName(const GURL& gurl, const std::string& cookie_name,
+                       std::string* cookie, bool* success);
+  void DeleteCookie(const GURL& gurl, const std::string& cookie_name,
+                    bool* success);
+  void SetCookie(const GURL& gurl, const std::string& cookie, bool* success);
 
  private:
   scoped_refptr<BrowserProxy> browser_;