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 // 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 named_channel_id_ = named_channel_id; | 62 named_channel_id_ = named_channel_id; |
63 launcher_.reset(CreateProxyLauncher()); | 63 launcher_.reset(CreateProxyLauncher()); |
64 } | 64 } |
65 | 65 |
66 virtual ProxyLauncher* CreateProxyLauncher() OVERRIDE; | 66 virtual ProxyLauncher* CreateProxyLauncher() OVERRIDE; |
67 | 67 |
68 // SetUp,TearDown is redeclared as public to make it accessible from swig. | 68 // SetUp,TearDown is redeclared as public to make it accessible from swig. |
69 virtual void SetUp() OVERRIDE; | 69 virtual void SetUp() OVERRIDE; |
70 virtual void TearDown() OVERRIDE; | 70 virtual void TearDown() OVERRIDE; |
71 | 71 |
72 // Get the URL of the active tab. | |
73 GURL GetActiveTabURL(int window_index = 0); | |
74 | |
75 int GetTabCount(int window_index = 0); | |
76 | |
77 // Activate the tab at the given zero-based index in the given or first | |
78 // browser window. Also brings the window to front. | |
79 bool ActivateTab(int tab_index, int window_index = 0); | |
80 | |
81 // Shows or hides the download shelf. | 72 // Shows or hides the download shelf. |
82 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); | 73 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); |
83 | 74 |
84 // Determines the visibility of the download shelf | 75 // Determines the visibility of the download shelf |
85 bool IsDownloadShelfVisible(int window_index = 0); | 76 bool IsDownloadShelfVisible(int window_index = 0); |
86 | 77 |
87 // Open the Find box | 78 // Open the Find box |
88 void OpenFindInPage(int window_index = 0); | 79 void OpenFindInPage(int window_index = 0); |
89 | 80 |
90 // Determines the visibility of the Find box | 81 // Determines the visibility of the Find box |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // This is necessary since python's unittest module creates instances of | 192 // This is necessary since python's unittest module creates instances of |
202 // TestCase at load time itself. | 193 // TestCase at load time itself. |
203 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 194 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
204 static MessageLoop* message_loop_; | 195 static MessageLoop* message_loop_; |
205 | 196 |
206 // Path to named channel id. | 197 // Path to named channel id. |
207 std::string named_channel_id_; | 198 std::string named_channel_id_; |
208 }; | 199 }; |
209 | 200 |
210 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 201 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
OLD | NEW |