| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...) to the | 95 // Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...) to the |
| 96 // browser window at the given or first index. | 96 // browser window at the given or first index. |
| 97 // The list can be found at chrome/app/chrome_command_ids.h | 97 // The list can be found at chrome/app/chrome_command_ids.h |
| 98 // Returns true if the call was successful. | 98 // Returns true if the call was successful. |
| 99 bool ApplyAccelerator(int id, int window_index = 0); | 99 bool ApplyAccelerator(int id, int window_index = 0); |
| 100 | 100 |
| 101 // Like ApplyAccelerator except that it waits for the command to execute. | 101 // Like ApplyAccelerator except that it waits for the command to execute. |
| 102 bool RunCommand(int browser_command, int window_index = 0); | 102 bool RunCommand(int browser_command, int window_index = 0); |
| 103 | 103 |
| 104 // Returns true if the given command id is enabled on the given window. |
| 105 bool IsMenuCommandEnabled(int browser_command, int window_index = 0); |
| 106 |
| 104 // Shows or hides the download shelf. | 107 // Shows or hides the download shelf. |
| 105 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); | 108 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); |
| 106 | 109 |
| 107 // Determines the visibility of the download shelf | 110 // Determines the visibility of the download shelf |
| 108 bool IsDownloadShelfVisible(int window_index = 0); | 111 bool IsDownloadShelfVisible(int window_index = 0); |
| 109 | 112 |
| 110 // Open the Find box | 113 // Open the Find box |
| 111 void OpenFindInPage(int window_index = 0); | 114 void OpenFindInPage(int window_index = 0); |
| 112 | 115 |
| 113 // Determines the visibility of the Find box | 116 // Determines the visibility of the Find box |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // This is necessary since python's unittest module creates instances of | 212 // This is necessary since python's unittest module creates instances of |
| 210 // TestCase at load time itself. | 213 // TestCase at load time itself. |
| 211 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 214 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
| 212 static MessageLoop* message_loop_; | 215 static MessageLoop* message_loop_; |
| 213 | 216 |
| 214 // Path to named channel id. | 217 // Path to named channel id. |
| 215 std::string named_channel_id_; | 218 std::string named_channel_id_; |
| 216 }; | 219 }; |
| 217 | 220 |
| 218 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 221 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
| OLD | NEW |