OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // Brings the browser window to the front and activates it. | 154 // Brings the browser window to the front and activates it. |
155 void BringBrowserToFront(int browser_handle, bool* success); | 155 void BringBrowserToFront(int browser_handle, bool* success); |
156 | 156 |
157 // Responds to requests to open the FindInPage window. | 157 // Responds to requests to open the FindInPage window. |
158 void HandleOpenFindInPageRequest(const IPC::Message& message, | 158 void HandleOpenFindInPageRequest(const IPC::Message& message, |
159 int handle); | 159 int handle); |
160 | 160 |
161 // Get the visibility state of the Find window. | 161 // Get the visibility state of the Find window. |
162 void GetFindWindowVisibility(int handle, bool* visible); | 162 void GetFindWindowVisibility(int handle, bool* visible); |
163 | 163 |
164 // Get the visibility state of the Bookmark bar. | |
165 void GetBookmarkBarVisibility( | |
166 int handle, bool* visible, bool* animating, bool* detached); | |
167 | |
168 // Get the bookmarks as a JSON string. | |
169 void GetBookmarksAsJSON(int handle, std::string* bookmarks_as_json, | |
170 bool* success); | |
171 | |
172 // Wait for the bookmark model to load. | 164 // Wait for the bookmark model to load. |
173 void WaitForBookmarkModelToLoad(int handle, IPC::Message* reply_message); | 165 void WaitForBookmarkModelToLoad(int handle, IPC::Message* reply_message); |
174 | 166 |
175 // Set |loaded| to true if the bookmark model has loaded, else false. | 167 // Set |loaded| to true if the bookmark model has loaded, else false. |
176 void BookmarkModelHasLoaded(int handle, bool* loaded); | 168 void BookmarkModelHasLoaded(int handle, bool* loaded); |
177 | 169 |
178 // Editing, modification, and removal of bookmarks. | 170 // Get the visibility state of the Bookmark bar. |
| 171 // Returns a status dictionary over the JSON interface. |
| 172 void GetBookmarkBarStatus(base::DictionaryValue* args, |
| 173 IPC::Message* reply_message); |
| 174 |
| 175 // Get the bookmarks as a JSON string. |
| 176 void GetBookmarksAsJSON(base::DictionaryValue* args, |
| 177 IPC::Message* reply_message); |
| 178 |
| 179 // Editing, modification, and removal of bookmarks through the JSON interface. |
179 // Bookmarks are referenced by id. | 180 // Bookmarks are referenced by id. |
180 void AddBookmarkGroup(int handle, | 181 void WaitForBookmarkModelToLoadJSON(base::DictionaryValue* args, |
181 int64 parent_id, int index, std::wstring title, | 182 IPC::Message* reply_message); |
182 bool* success); | 183 void AddBookmark(base::DictionaryValue* args, |
183 void AddBookmarkURL(int handle, | 184 IPC::Message* reply_message); |
184 int64 parent_id, int index, | 185 void ReparentBookmark(base::DictionaryValue* args, |
185 std::wstring title, const GURL& url, | 186 IPC::Message* reply_message); |
186 bool* success); | 187 void SetBookmarkTitle(base::DictionaryValue* args, |
187 void ReparentBookmark(int handle, | 188 IPC::Message* reply_message); |
188 int64 id, int64 new_parent_id, int index, | 189 void SetBookmarkURL(base::DictionaryValue* args, |
189 bool* success); | 190 IPC::Message* reply_message); |
190 void SetBookmarkTitle(int handle, | 191 void RemoveBookmark(base::DictionaryValue* args, |
191 int64 id, std::wstring title, | 192 IPC::Message* reply_message); |
192 bool* success); | |
193 void SetBookmarkURL(int handle, | |
194 int64 id, const GURL& url, | |
195 bool* success); | |
196 void RemoveBookmark(int handle, | |
197 int64 id, | |
198 bool* success); | |
199 | 193 |
200 void WaitForBrowserWindowCountToBecome(int target_count, | 194 void WaitForBrowserWindowCountToBecome(int target_count, |
201 IPC::Message* reply_message); | 195 IPC::Message* reply_message); |
202 | 196 |
203 void GoBackBlockUntilNavigationsComplete(int handle, | 197 void GoBackBlockUntilNavigationsComplete(int handle, |
204 int number_of_navigations, | 198 int number_of_navigations, |
205 IPC::Message* reply_message); | 199 IPC::Message* reply_message); |
206 | 200 |
207 void GoForwardBlockUntilNavigationsComplete(int handle, | 201 void GoForwardBlockUntilNavigationsComplete(int handle, |
208 int number_of_navigations, | 202 int number_of_navigations, |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1739 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1733 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
1740 | 1734 |
1741 // List of commands which just finish synchronously and don't require | 1735 // List of commands which just finish synchronously and don't require |
1742 // setting up an observer. | 1736 // setting up an observer. |
1743 static const int kSynchronousCommands[]; | 1737 static const int kSynchronousCommands[]; |
1744 | 1738 |
1745 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1739 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1746 }; | 1740 }; |
1747 | 1741 |
1748 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1742 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |