| 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 // This file declares the C++ side of PyAuto, the python interface to | 5 // This file declares the C++ side of PyAuto, the python interface to |
| 6 // Chromium automation. It access Chromium's internals using Automation Proxy. | 6 // Chromium automation. It access Chromium's internals using Automation Proxy. |
| 7 | 7 |
| 8 #ifndef CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 8 #ifndef CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
| 9 #define CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 9 #define CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 bool RemoveBookmark(std::wstring& id); | 140 bool RemoveBookmark(std::wstring& id); |
| 141 | 141 |
| 142 // Get a handle to browser window at the given index, or NULL on failure. | 142 // Get a handle to browser window at the given index, or NULL on failure. |
| 143 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 143 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
| 144 | 144 |
| 145 // Meta-method. Experimental pattern of passing args and response as | 145 // Meta-method. Experimental pattern of passing args and response as |
| 146 // JSON dict to avoid future use of the SWIG interface and | 146 // JSON dict to avoid future use of the SWIG interface and |
| 147 // automation proxy additions. Returns response as JSON dict. | 147 // automation proxy additions. Returns response as JSON dict. |
| 148 std::string _SendJSONRequest(int window_index, std::string& request); | 148 std::string _SendJSONRequest(int window_index, std::string& request); |
| 149 | 149 |
| 150 // Resets to the default theme. Returns true on success. |
| 151 bool ResetToDefaultTheme(); |
| 152 |
| 150 private: | 153 private: |
| 151 // Enables PostTask to main thread. | 154 // Enables PostTask to main thread. |
| 152 // Should be shared across multiple instances of PyUITestBase so that this | 155 // Should be shared across multiple instances of PyUITestBase so that this |
| 153 // class is re-entrant and multiple instances can be created. | 156 // class is re-entrant and multiple instances can be created. |
| 154 // This is necessary since python's unittest module creates instances of | 157 // This is necessary since python's unittest module creates instances of |
| 155 // TestCase at load time itself. | 158 // TestCase at load time itself. |
| 156 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 159 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
| 157 static MessageLoop* message_loop_; | 160 static MessageLoop* message_loop_; |
| 158 }; | 161 }; |
| 159 | 162 |
| 160 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 163 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
| 161 | 164 |
| OLD | NEW |