| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 %feature("docstring", | 63 %feature("docstring", |
| 64 "Represent a file path. Call value() to get the string.") FilePath; | 64 "Represent a file path. Call value() to get the string.") FilePath; |
| 65 class FilePath { | 65 class FilePath { |
| 66 public: | 66 public: |
| 67 %feature("docstring", "Get the string representation.") value; | 67 %feature("docstring", "Get the string representation.") value; |
| 68 #ifdef SWIGWIN | 68 #ifdef SWIGWIN |
| 69 typedef std::wstring StringType; | 69 typedef std::wstring StringType; |
| 70 #else | 70 #else |
| 71 typedef std::string StringType; | 71 typedef std::string StringType; |
| 72 #endif // OS_WIN | 72 #endif // SWIGWIN |
| 73 const StringType& value() const; | 73 const StringType& value() const; |
| 74 %feature("docstring", "Construct an empty FilePath or from a string.") | 74 %feature("docstring", "Construct an empty FilePath or from a string.") |
| 75 FilePath; | 75 FilePath; |
| 76 FilePath(); | 76 FilePath(); |
| 77 explicit FilePath(const StringType& path); | 77 explicit FilePath(const StringType& path); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 class PyUITestSuite { | 80 class PyUITestSuite { |
| 81 public: | 81 public: |
| 82 PyUITestSuite(int argc, char** argv); | 82 PyUITestSuite(int argc, char** argv); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 103 "The list can be found at chrome/app/chrome_dll_resource.h. " | 103 "The list can be found at chrome/app/chrome_dll_resource.h. " |
| 104 "Note that this method just schedules the accelerator, but does " | 104 "Note that this method just schedules the accelerator, but does " |
| 105 "not wait for it to actually finish doing anything." | 105 "not wait for it to actually finish doing anything." |
| 106 "Returns True on success.") | 106 "Returns True on success.") |
| 107 ApplyAccelerator; | 107 ApplyAccelerator; |
| 108 bool ApplyAccelerator(int id, int window_index=0); | 108 bool ApplyAccelerator(int id, int window_index=0); |
| 109 | 109 |
| 110 // Get/fetch properties | 110 // Get/fetch properties |
| 111 %feature("docstring", | 111 %feature("docstring", |
| 112 "Get the path to download directory.") GetDownloadDirectory; | 112 "Get the path to download directory.") GetDownloadDirectory; |
| 113 std::string GetDownloadDirectory(); | 113 FilePath GetDownloadDirectory(); |
| 114 | 114 |
| 115 %feature("docstring", "Get the path to profile directory.") user_data_dir; | 115 %feature("docstring", "Get the path to profile directory.") user_data_dir; |
| 116 FilePath user_data_dir() const; | 116 FilePath user_data_dir() const; |
| 117 | 117 |
| 118 %feature("docstring", "Set download shelf visibility for the given or " | 118 %feature("docstring", "Set download shelf visibility for the given or " |
| 119 "first browser window.") SetDownloadShelfVisible; | 119 "first browser window.") SetDownloadShelfVisible; |
| 120 void SetDownloadShelfVisible(bool is_visible, int window_index=0); | 120 void SetDownloadShelfVisible(bool is_visible, int window_index=0); |
| 121 | 121 |
| 122 %feature("docstring", "Determine if the download shelf is visible in the " | 122 %feature("docstring", "Determine if the download shelf is visible in the " |
| 123 "given or first browser window.") IsDownloadShelfVisible; | 123 "given or first browser window.") IsDownloadShelfVisible; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 %feature("docstring", "Determine if the browser is running. " | 162 %feature("docstring", "Determine if the browser is running. " |
| 163 "Returns False if user closed the window or if the browser died") | 163 "Returns False if user closed the window or if the browser died") |
| 164 IsBrowserRunning; | 164 IsBrowserRunning; |
| 165 bool IsBrowserRunning(); | 165 bool IsBrowserRunning(); |
| 166 | 166 |
| 167 %feature("docstring", "Install an extension from the given file. Returns " | 167 %feature("docstring", "Install an extension from the given file. Returns " |
| 168 "True if successfully installed and loaded.") InstallExtension; | 168 "True if successfully installed and loaded.") InstallExtension; |
| 169 bool InstallExtension(const FilePath& crx_file); | 169 bool InstallExtension(const FilePath& crx_file); |
| 170 }; | 170 }; |
| 171 | 171 |
| OLD | NEW |