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 // Swig Interface for PyAuto. | 5 // Swig Interface for PyAuto. |
6 // PyAuto makes the Automation Proxy interface available in Python | 6 // PyAuto makes the Automation Proxy interface available in Python |
7 // | 7 // |
8 // Running swig as: | 8 // Running swig as: |
9 // swig -python -c++ chrome/test/pyautolib/pyautolib.i | 9 // swig -python -c++ chrome/test/pyautolib/pyautolib.i |
10 // would generate pyautolib.py, pyautolib_wrap.cxx | 10 // would generate pyautolib.py, pyautolib_wrap.cxx |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 bool get_clear_profile() const; | 271 bool get_clear_profile() const; |
272 %feature("docstring", "If False, sets the flag so that the profile is " | 272 %feature("docstring", "If False, sets the flag so that the profile is " |
273 "not cleared on next startup. Useful for persisting profile " | 273 "not cleared on next startup. Useful for persisting profile " |
274 "across restarts. By default the state is True, to clear profile.") | 274 "across restarts. By default the state is True, to clear profile.") |
275 set_clear_profile; | 275 set_clear_profile; |
276 void set_clear_profile(bool clear_profile); | 276 void set_clear_profile(bool clear_profile); |
277 | 277 |
278 %feature("docstring", "Get the path to profile directory.") user_data_dir; | 278 %feature("docstring", "Get the path to profile directory.") user_data_dir; |
279 FilePath user_data_dir() const; | 279 FilePath user_data_dir() const; |
280 | 280 |
281 %feature("docstring", "Determine if the bookmark bar is visible. " | |
282 "If the NTP is visible, only return true if attached " | |
283 "(to the chrome).") GetBookmarkBarVisibility; | |
284 bool GetBookmarkBarVisibility(); | |
285 | |
286 %feature("docstring", "Determine if the bookmark bar is detached. " | |
287 "This usually is only true on the NTP.") IsBookmarkBarDetached; | |
288 bool IsBookmarkBarDetached(); | |
289 | |
290 %feature("docstring", "Wait for the bookmark bar animation to complete. " | |
291 "|wait_for_open| specifies which kind of change we wait for.") | |
292 WaitForBookmarkBarVisibilityChange; | |
293 bool WaitForBookmarkBarVisibilityChange(bool wait_for_open, | |
294 int window_index=0); | |
295 | |
296 %feature("docstring", "Get the bookmarks as a JSON string. Internal method.") | |
297 _GetBookmarksAsJSON; | |
298 std::string _GetBookmarksAsJSON(int window_index=0); | |
299 | |
300 %feature("docstring", "Add a bookmark folder with the given index in the " | |
301 " parent. |title| is the title/name of the folder.") | |
302 AddBookmarkGroup; | |
303 bool AddBookmarkGroup(std::wstring parent_id, | |
304 int index, std::wstring title, | |
305 int window_index=0); | |
306 | |
307 %feature("docstring", "Add a bookmark with the given title and URL.") | |
308 AddBookmarkURL; | |
309 bool AddBookmarkURL(std::wstring parent_id, | |
310 int index, | |
311 std::wstring title, | |
312 const std::wstring url, | |
313 int window_index=0); | |
314 | |
315 %feature("docstring", "Move a bookmark to a new parent.") ReparentBookmark; | |
316 bool ReparentBookmark(std::wstring id, | |
317 std::wstring new_parent_id, | |
318 int index, | |
319 int window_index=0); | |
320 | |
321 %feature("docstring", "Set the title of a bookmark.") SetBookmarkTitle; | |
322 bool SetBookmarkTitle(std::wstring id, | |
323 std::wstring title, | |
324 int window_index=0); | |
325 | |
326 %feature("docstring", "Set the URL of a bookmark.") SetBookmarkURL; | |
327 bool SetBookmarkURL(std::wstring id, | |
328 const std::wstring url, | |
329 int window_index=0); | |
330 | |
331 %feature("docstring", "Remove (delete) a bookmark.") RemoveBookmark; | |
332 bool RemoveBookmark(std::wstring id, int window_index=0); | |
333 | |
334 // Misc methods | 281 // Misc methods |
335 %feature("docstring", "Get a proxy to the browser window at the given " | 282 %feature("docstring", "Get a proxy to the browser window at the given " |
336 "zero-based index.") GetBrowserWindow; | 283 "zero-based index.") GetBrowserWindow; |
337 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 284 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
338 | 285 |
339 // Meta-method | 286 // Meta-method |
340 %feature("docstring", "Send a sync JSON request to Chrome. " | 287 %feature("docstring", "Send a sync JSON request to Chrome. " |
341 "Returns a JSON dict as a response. " | 288 "Returns a JSON dict as a response. " |
342 "Given timeout in milliseconds." | 289 "Given timeout in milliseconds." |
343 "Internal method.") | 290 "Internal method.") |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // Initialize a new HTTPSOptions that will use the specified certificate. | 368 // Initialize a new HTTPSOptions that will use the specified certificate. |
422 explicit HTTPSOptions(ServerCertificate cert); | 369 explicit HTTPSOptions(ServerCertificate cert); |
423 }; | 370 }; |
424 | 371 |
425 %{ | 372 %{ |
426 typedef net::TestServer::HTTPSOptions HTTPSOptions; | 373 typedef net::TestServer::HTTPSOptions HTTPSOptions; |
427 %} | 374 %} |
428 | 375 |
429 %pointer_class(int, int_ptr); | 376 %pointer_class(int, int_ptr); |
430 %pointer_class(uint32, uint32_ptr); | 377 %pointer_class(uint32, uint32_ptr); |
OLD | NEW |