| 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_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 // output: { "url": "http://www.google.com" } | 856 // output: { "url": "http://www.google.com" } |
| 857 void GetTabURLJSON(DictionaryValue* args, IPC::Message* reply_message); | 857 void GetTabURLJSON(DictionaryValue* args, IPC::Message* reply_message); |
| 858 | 858 |
| 859 // Get the current url of the specified tab. Uses the JSON interface. | 859 // Get the current url of the specified tab. Uses the JSON interface. |
| 860 // Example: | 860 // Example: |
| 861 // input: { "windex": 1, "tab_index": 1 } | 861 // input: { "windex": 1, "tab_index": 1 } |
| 862 // output: { "title": "Google" } | 862 // output: { "title": "Google" } |
| 863 void GetTabTitleJSON(DictionaryValue* args, IPC::Message* reply_message); | 863 void GetTabTitleJSON(DictionaryValue* args, IPC::Message* reply_message); |
| 864 | 864 |
| 865 // Gets the cookies for the given URL. Uses the JSON interface. | 865 // Gets the cookies for the given URL. Uses the JSON interface. |
| 866 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, |
| 867 // the cookie is valid for the duration of the browser session. |
| 866 // Example: | 868 // Example: |
| 867 // input: { "windex": 1, "tab_index": 1, "url": "http://www.google.com" } | 869 // input: { "url": "http://www.google.com" } |
| 868 // output: { "cookies": "PREF=12012" } | 870 // output: { "cookies": [ |
| 871 // { |
| 872 // "name": "PREF", |
| 873 // "value": "123101", |
| 874 // "path": "/", |
| 875 // "domain": "www.google.com", |
| 876 // "secure": false, |
| 877 // "expiry": 1401982012 |
| 878 // } |
| 879 // ] |
| 880 // } |
| 869 void GetCookiesJSON(DictionaryValue* args, IPC::Message* reply_message); | 881 void GetCookiesJSON(DictionaryValue* args, IPC::Message* reply_message); |
| 870 | 882 |
| 871 // Deletes the cookie with the given name for the URL. Uses the JSON | 883 // Deletes the cookie with the given name for the URL. Uses the JSON |
| 872 // interface. | 884 // interface. |
| 873 // Example: | 885 // Example: |
| 874 // input: { "windex": 1, | 886 // input: { |
| 875 // "tab_index": 1, | |
| 876 // "url": "http://www.google.com", | 887 // "url": "http://www.google.com", |
| 877 // "name": "my_cookie" | 888 // "name": "my_cookie" |
| 878 // } | 889 // } |
| 879 // output: none | 890 // output: none |
| 880 void DeleteCookieJSON(DictionaryValue* args, IPC::Message* reply_message); | 891 void DeleteCookieJSON(DictionaryValue* args, IPC::Message* reply_message); |
| 881 | 892 |
| 882 // Sets a cookie for the given URL. Uses the JSON interface. | 893 // Sets a cookie for the given URL. Uses the JSON interface. |
| 894 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, |
| 895 // the cookie will be valid for the duration of the browser session. |
| 896 // "domain" refers to the applicable domain for the cookie. Valid domain |
| 897 // choices for the site "http://www.google.com" and resulting cookie |
| 898 // applicability: |
| 899 // [.]www.google.com - applicable on www.google.com and its subdomains |
| 900 // [.]google.com - applicable on google.com and its subdomains |
| 901 // <none> - applicable only on www.google.com |
| 902 // |
| 883 // Example: | 903 // Example: |
| 884 // input: { "windex": 1, | 904 // input: { "url": "http://www.google.com", |
| 885 // "tab_index": 1, | 905 // "cookie": { |
| 886 // "url": "http://www.google.com", | 906 // "name": "PREF", |
| 887 // "cookie": "PREF=21321" | 907 // "value": "123101", |
| 908 // "path": "/", // optional |
| 909 // "domain": ".www.google.com", // optional |
| 910 // "secure": false, // optional |
| 911 // "expiry": 1401982012 // optional |
| 912 // } |
| 888 // } | 913 // } |
| 889 // output: none | 914 // output: none |
| 890 void SetCookieJSON(DictionaryValue* args, IPC::Message* reply_message); | 915 void SetCookieJSON(DictionaryValue* args, IPC::Message* reply_message); |
| 891 | 916 |
| 892 // Gets the ID for every open tab. This ID is unique per session. | 917 // Gets the ID for every open tab. This ID is unique per session. |
| 893 // Example: | 918 // Example: |
| 894 // input: none | 919 // input: none |
| 895 // output: { "ids": [4124, 213, 1] } | 920 // output: { "ids": [4124, 213, 1] } |
| 896 void GetTabIds(DictionaryValue* args, IPC::Message* reply_message); | 921 void GetTabIds(DictionaryValue* args, IPC::Message* reply_message); |
| 897 | 922 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 // Used to enumerate browser profiles. | 1074 // Used to enumerate browser profiles. |
| 1050 scoped_refptr<ImporterList> importer_list_; | 1075 scoped_refptr<ImporterList> importer_list_; |
| 1051 | 1076 |
| 1052 // The stored data for the ImportSettings operation. | 1077 // The stored data for the ImportSettings operation. |
| 1053 ImportSettingsData import_settings_data_; | 1078 ImportSettingsData import_settings_data_; |
| 1054 | 1079 |
| 1055 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1080 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1056 }; | 1081 }; |
| 1057 | 1082 |
| 1058 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1083 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |