| 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 // 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 int window_index=0, int tab_index=0); | 372 int window_index=0, int tab_index=0); |
| 373 | 373 |
| 374 %feature("docstring", "Get the value of the cookie at cookie_url for the " | 374 %feature("docstring", "Get the value of the cookie at cookie_url for the " |
| 375 "given window index and tab index. " | 375 "given window index and tab index. " |
| 376 "Returns empty string on error or if there is no value for the " | 376 "Returns empty string on error or if there is no value for the " |
| 377 "cookie.") GetCookie; | 377 "cookie.") GetCookie; |
| 378 std::string GetCookie(const GURL& cookie_url, int window_index=0, | 378 std::string GetCookie(const GURL& cookie_url, int window_index=0, |
| 379 int tab_index=0); | 379 int tab_index=0); |
| 380 | 380 |
| 381 // Misc methods | 381 // Misc methods |
| 382 %feature("docstring", "Install an extension from the given path. The path " | |
| 383 "must be absolute and may be a crx file or an unpacked extension " | |
| 384 "directory. Returns the extension ID if successfully installed and " | |
| 385 "loaded. Otherwise, returns the empty string.") InstallExtension; | |
| 386 std::string InstallExtension(const std::string& extension_path, bool with_ui); | |
| 387 | |
| 388 %feature("docstring", "Get a proxy to the browser window at the given " | 382 %feature("docstring", "Get a proxy to the browser window at the given " |
| 389 "zero-based index.") GetBrowserWindow; | 383 "zero-based index.") GetBrowserWindow; |
| 390 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 384 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
| 391 | 385 |
| 392 // Meta-method | 386 // Meta-method |
| 393 %feature("docstring", "Send a sync JSON request to Chrome. " | 387 %feature("docstring", "Send a sync JSON request to Chrome. " |
| 394 "Returns a JSON dict as a response. " | 388 "Returns a JSON dict as a response. " |
| 395 "Given timeout in milliseconds." | 389 "Given timeout in milliseconds." |
| 396 "Internal method.") | 390 "Internal method.") |
| 397 _SendJSONRequest; | 391 _SendJSONRequest; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 GetSyncXmppPort; | 442 GetSyncXmppPort; |
| 449 int GetSyncXmppPort() const { | 443 int GetSyncXmppPort() const { |
| 450 int val = 0; | 444 int val = 0; |
| 451 $self->server_data().GetInteger("xmpp_port", &val); | 445 $self->server_data().GetInteger("xmpp_port", &val); |
| 452 return val; | 446 return val; |
| 453 } | 447 } |
| 454 }; | 448 }; |
| 455 | 449 |
| 456 } | 450 } |
| 457 | 451 |
| OLD | NEW |