| 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 #ifndef CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
| 6 #define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 6 #define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/common/content_settings.h" | 14 #include "chrome/common/content_settings.h" |
| 15 #include "chrome/test/automation/automation_handle_tracker.h" | 15 #include "chrome/test/automation/automation_handle_tracker.h" |
| 16 | 16 |
| 17 class AutocompleteEditProxy; | |
| 18 class GURL; | 17 class GURL; |
| 19 class TabProxy; | 18 class TabProxy; |
| 20 class WindowProxy; | 19 class WindowProxy; |
| 21 | 20 |
| 22 namespace gfx { | 21 namespace gfx { |
| 23 class Point; | 22 class Point; |
| 24 class Rect; | 23 class Rect; |
| 25 } | 24 } |
| 26 | 25 |
| 27 // This class presents the interface to actions that can be performed on | 26 // This class presents the interface to actions that can be performed on |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // Returns the TabProxy for the currently active tab, transferring | 77 // Returns the TabProxy for the currently active tab, transferring |
| 79 // ownership of the pointer to the caller. On failure, returns NULL. | 78 // ownership of the pointer to the caller. On failure, returns NULL. |
| 80 scoped_refptr<TabProxy> GetActiveTab() const; | 79 scoped_refptr<TabProxy> GetActiveTab() const; |
| 81 | 80 |
| 82 // Returns the WindowProxy for this browser's window. It can be used to | 81 // Returns the WindowProxy for this browser's window. It can be used to |
| 83 // retreive view bounds, simulate clicks and key press events. The caller | 82 // retreive view bounds, simulate clicks and key press events. The caller |
| 84 // owns the returned WindowProxy. | 83 // owns the returned WindowProxy. |
| 85 // On failure, returns NULL. | 84 // On failure, returns NULL. |
| 86 scoped_refptr<WindowProxy> GetWindow() const; | 85 scoped_refptr<WindowProxy> GetWindow() const; |
| 87 | 86 |
| 88 // Returns an AutocompleteEdit for this browser's window. It can be used to | |
| 89 // manipulate the omnibox. The caller owns the returned pointer. | |
| 90 // On failure, returns NULL. | |
| 91 scoped_refptr<AutocompleteEditProxy> GetAutocompleteEdit(); | |
| 92 | |
| 93 // Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...) | 87 // Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...) |
| 94 // The list can be found at chrome/app/chrome_command_ids.h | 88 // The list can be found at chrome/app/chrome_command_ids.h |
| 95 // Returns true if the call was successful. | 89 // Returns true if the call was successful. |
| 96 // | 90 // |
| 97 // The alternate way to test the accelerators is to use the Windows messaging | 91 // The alternate way to test the accelerators is to use the Windows messaging |
| 98 // system to send the actual keyboard events (ui_controls.h) A precondition | 92 // system to send the actual keyboard events (ui_controls.h) A precondition |
| 99 // to using this system is that the target window should have the keyboard | 93 // to using this system is that the target window should have the keyboard |
| 100 // focus. This leads to a flaky test behavior in circumstances when the | 94 // focus. This leads to a flaky test behavior in circumstances when the |
| 101 // desktop screen is locked or the test is being executed over a remote | 95 // desktop screen is locked or the test is being executed over a remote |
| 102 // desktop. | 96 // desktop. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 std::vector<float>* stop_times); | 233 std::vector<float>* stop_times); |
| 240 | 234 |
| 241 | 235 |
| 242 protected: | 236 protected: |
| 243 virtual ~BrowserProxy() {} | 237 virtual ~BrowserProxy() {} |
| 244 private: | 238 private: |
| 245 DISALLOW_COPY_AND_ASSIGN(BrowserProxy); | 239 DISALLOW_COPY_AND_ASSIGN(BrowserProxy); |
| 246 }; | 240 }; |
| 247 | 241 |
| 248 #endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ | 242 #endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_ |
| OLD | NEW |