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 // 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 #pragma once | 10 #pragma once |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 // Open a new browser window. Returns false on failure. | 116 // Open a new browser window. Returns false on failure. |
117 bool OpenNewBrowserWindow(bool show); | 117 bool OpenNewBrowserWindow(bool show); |
118 | 118 |
119 // Close a browser window. Returns false on failure. | 119 // Close a browser window. Returns false on failure. |
120 bool CloseBrowserWindow(int window_index); | 120 bool CloseBrowserWindow(int window_index); |
121 | 121 |
122 // Fetch the number of browser windows. Includes popups. | 122 // Fetch the number of browser windows. Includes popups. |
123 int GetBrowserWindowCount(); | 123 int GetBrowserWindowCount(); |
124 | 124 |
125 // Installs the extension crx. Returns the extension ID only if the extension | 125 // Installs the extension. Returns the extension ID only if the extension |
126 // was installed and loaded successfully. Otherwise, returns the empty | 126 // was installed and loaded successfully. Otherwise, returns the empty |
127 // string. Overinstalls will fail. | 127 // string. Overinstalls will fail. |
128 std::string InstallExtension(const FilePath& crx_file, bool with_ui); | 128 std::string InstallExtension(const std::string& extension_path, bool with_ui); |
129 | 129 |
130 // Returns bookmark bar visibility state. | 130 // Returns bookmark bar visibility state. |
131 bool GetBookmarkBarVisibility(); | 131 bool GetBookmarkBarVisibility(); |
132 | 132 |
133 // Returns bookmark bar animation state. Warning: timing issues may | 133 // Returns bookmark bar animation state. Warning: timing issues may |
134 // change this return value unexpectedly. | 134 // change this return value unexpectedly. |
135 bool IsBookmarkBarAnimating(); | 135 bool IsBookmarkBarAnimating(); |
136 | 136 |
137 // Wait for the bookmark bar animation to complete. | 137 // Wait for the bookmark bar animation to complete. |
138 // If |wait_for_open| is true, wait for it to open. | 138 // If |wait_for_open| is true, wait for it to open. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // This is necessary since python's unittest module creates instances of | 217 // This is necessary since python's unittest module creates instances of |
218 // TestCase at load time itself. | 218 // TestCase at load time itself. |
219 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 219 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
220 static MessageLoop* message_loop_; | 220 static MessageLoop* message_loop_; |
221 | 221 |
222 // Path to named channel id. | 222 // Path to named channel id. |
223 std::string named_channel_id_; | 223 std::string named_channel_id_; |
224 }; | 224 }; |
225 | 225 |
226 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 226 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
OLD | NEW |