| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ | 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 class AutomationProvider; | 13 class AutomationProvider; |
| 14 class Browser; | 14 class Browser; |
| 15 class DictionaryValue; | |
| 16 class GURL; | 15 class GURL; |
| 17 class TabContents; | 16 class TabContents; |
| 18 | 17 |
| 18 namespace base { |
| 19 class DictionaryValue; |
| 20 } |
| 21 |
| 19 namespace IPC { | 22 namespace IPC { |
| 20 class Message; | 23 class Message; |
| 21 } | 24 } |
| 22 | 25 |
| 23 // This file contains automation utility functions. | 26 // This file contains automation utility functions. |
| 24 | 27 |
| 25 namespace automation_util { | 28 namespace automation_util { |
| 26 | 29 |
| 27 // Returns the browser at the given index of the |BrowserList| or NULL if the | 30 // Returns the browser at the given index of the |BrowserList| or NULL if the |
| 28 // index is out of range. | 31 // index is out of range. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 | 50 |
| 48 // Deletes a cookie for |url| in the given tab. Can be called from any thread. | 51 // Deletes a cookie for |url| in the given tab. Can be called from any thread. |
| 49 void DeleteCookie(const GURL& url, | 52 void DeleteCookie(const GURL& url, |
| 50 const std::string& cookie_name, | 53 const std::string& cookie_name, |
| 51 TabContents* contents, | 54 TabContents* contents, |
| 52 bool* success); | 55 bool* success); |
| 53 | 56 |
| 54 // Gets the cookies for the given URL. Uses the JSON interface. | 57 // Gets the cookies for the given URL. Uses the JSON interface. |
| 55 // See |TestingAutomationProvider| for example input. | 58 // See |TestingAutomationProvider| for example input. |
| 56 void GetCookiesJSON(AutomationProvider* provider, | 59 void GetCookiesJSON(AutomationProvider* provider, |
| 57 DictionaryValue* args, | 60 base::DictionaryValue* args, |
| 58 IPC::Message* reply_message); | 61 IPC::Message* reply_message); |
| 59 | 62 |
| 60 // Deletes the cookie with the given name for the URL. Uses the JSON interface. | 63 // Deletes the cookie with the given name for the URL. Uses the JSON interface. |
| 61 // See |TestingAutomationProvider| for example input. | 64 // See |TestingAutomationProvider| for example input. |
| 62 void DeleteCookieJSON(AutomationProvider* provider, | 65 void DeleteCookieJSON(AutomationProvider* provider, |
| 63 DictionaryValue* args, | 66 base::DictionaryValue* args, |
| 64 IPC::Message* reply_message); | 67 IPC::Message* reply_message); |
| 65 | 68 |
| 66 // Sets a cookie for the given URL. Uses the JSON interface. | 69 // Sets a cookie for the given URL. Uses the JSON interface. |
| 67 // See |TestingAutomationProvider| for example input. | 70 // See |TestingAutomationProvider| for example input. |
| 68 void SetCookieJSON(AutomationProvider* provider, | 71 void SetCookieJSON(AutomationProvider* provider, |
| 69 DictionaryValue* args, | 72 base::DictionaryValue* args, |
| 70 IPC::Message* reply_message); | 73 IPC::Message* reply_message); |
| 71 | 74 |
| 72 } // namespace automation_util | 75 } // namespace automation_util |
| 73 | 76 |
| 74 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ | 77 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_ |
| OLD | NEW |