| 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 #pragma once | 10 #pragma once |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // Appends a new tab with the given URL in the given or first browser window. | 70 // Appends a new tab with the given URL in the given or first browser window. |
| 71 bool AppendTab(const GURL& tab_url, int window_index = 0); | 71 bool AppendTab(const GURL& tab_url, int window_index = 0); |
| 72 | 72 |
| 73 // Activate the tab at the given zero-based index in the given or first | 73 // Activate the tab at the given zero-based index in the given or first |
| 74 // browser window. | 74 // browser window. |
| 75 bool ActivateTab(int tab_index, int window_index = 0); | 75 bool ActivateTab(int tab_index, int window_index = 0); |
| 76 | 76 |
| 77 // Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...) to the | 77 // Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...) to the |
| 78 // browser window at the given or first index. | 78 // browser window at the given or first index. |
| 79 // The list can be found at chrome/app/chrome_dll_resource.h | 79 // The list can be found at chrome/app/chrome_command_ids.h |
| 80 // Returns true if the call was successful. | 80 // Returns true if the call was successful. |
| 81 bool ApplyAccelerator(int id, int window_index = 0); | 81 bool ApplyAccelerator(int id, int window_index = 0); |
| 82 | 82 |
| 83 // Like ApplyAccelerator except that it waits for the command to execute. | 83 // Like ApplyAccelerator except that it waits for the command to execute. |
| 84 bool RunCommand(int browser_command, int window_index = 0); | 84 bool RunCommand(int browser_command, int window_index = 0); |
| 85 | 85 |
| 86 // Shows or hides the download shelf. | 86 // Shows or hides the download shelf. |
| 87 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); | 87 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); |
| 88 | 88 |
| 89 // Determines the visibility of the download shelf | 89 // Determines the visibility of the download shelf |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Enables PostTask to main thread. | 185 // Enables PostTask to main thread. |
| 186 // Should be shared across multiple instances of PyUITestBase so that this | 186 // Should be shared across multiple instances of PyUITestBase so that this |
| 187 // class is re-entrant and multiple instances can be created. | 187 // class is re-entrant and multiple instances can be created. |
| 188 // This is necessary since python's unittest module creates instances of | 188 // This is necessary since python's unittest module creates instances of |
| 189 // TestCase at load time itself. | 189 // TestCase at load time itself. |
| 190 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 190 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
| 191 static MessageLoop* message_loop_; | 191 static MessageLoop* message_loop_; |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 194 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
| OLD | NEW |