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 #ifndef CHROME_TEST_AUTOMATION_WINDOW_PROXY_H__ | 5 #ifndef CHROME_TEST_AUTOMATION_WINDOW_PROXY_H__ |
6 #define CHROME_TEST_AUTOMATION_WINDOW_PROXY_H__ | 6 #define CHROME_TEST_AUTOMATION_WINDOW_PROXY_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
12 #include <windows.h> | 12 #include <windows.h> |
13 #endif | 13 #endif |
14 | 14 |
15 #include "app/keyboard_codes.h" | 15 #include "base/keyboard_codes.h" |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
17 #include "base/thread.h" | 17 #include "base/thread.h" |
18 #include "chrome/test/automation/automation_handle_tracker.h" | 18 #include "chrome/test/automation/automation_handle_tracker.h" |
19 | 19 |
20 class BrowserProxy; | 20 class BrowserProxy; |
21 class WindowProxy; | 21 class WindowProxy; |
22 | 22 |
23 namespace gfx { | 23 namespace gfx { |
24 class Point; | 24 class Point; |
25 class Rect; | 25 class Rect; |
(...skipping 21 matching lines...) Expand all Loading... |
47 // in the window's coordinates. | 47 // in the window's coordinates. |
48 bool SimulateOSMouseMove(const gfx::Point& location); | 48 bool SimulateOSMouseMove(const gfx::Point& location); |
49 | 49 |
50 // Get the title of the top level window. | 50 // Get the title of the top level window. |
51 bool GetWindowTitle(string16* text); | 51 bool GetWindowTitle(string16* text); |
52 | 52 |
53 // Simulates a key press at the OS level. |key| is the virtual key code of the | 53 // Simulates a key press at the OS level. |key| is the virtual key code of the |
54 // key pressed and |flags| specifies which modifiers keys are also pressed (as | 54 // key pressed and |flags| specifies which modifiers keys are also pressed (as |
55 // defined in chrome/views/event.h). Note that this actually sends the event | 55 // defined in chrome/views/event.h). Note that this actually sends the event |
56 // to the window that has focus. | 56 // to the window that has focus. |
57 bool SimulateOSKeyPress(app::KeyboardCode key, int flags); | 57 bool SimulateOSKeyPress(base::KeyboardCode key, int flags); |
58 | 58 |
59 // Shows/hides the window and as a result makes it active/inactive. | 59 // Shows/hides the window and as a result makes it active/inactive. |
60 // Returns true if the call was successful. | 60 // Returns true if the call was successful. |
61 bool SetVisible(bool visible); | 61 bool SetVisible(bool visible); |
62 | 62 |
63 // Sets |active| to true if this view is currently the active window. | 63 // Sets |active| to true if this view is currently the active window. |
64 // Returns true if the call was successful. | 64 // Returns true if the call was successful. |
65 bool IsActive(bool* active); | 65 bool IsActive(bool* active); |
66 | 66 |
67 // Make this window the active window. | 67 // Make this window the active window. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // before the specified timeout. | 101 // before the specified timeout. |
102 scoped_refptr<BrowserProxy> GetBrowserWithTimeout(uint32 timeout_ms, | 102 scoped_refptr<BrowserProxy> GetBrowserWithTimeout(uint32 timeout_ms, |
103 bool* is_timeout); | 103 bool* is_timeout); |
104 protected: | 104 protected: |
105 virtual ~WindowProxy() {} | 105 virtual ~WindowProxy() {} |
106 private: | 106 private: |
107 DISALLOW_COPY_AND_ASSIGN(WindowProxy); | 107 DISALLOW_COPY_AND_ASSIGN(WindowProxy); |
108 }; | 108 }; |
109 | 109 |
110 #endif // CHROME_TEST_AUTOMATION_WINDOW_PROXY_H__ | 110 #endif // CHROME_TEST_AUTOMATION_WINDOW_PROXY_H__ |
OLD | NEW |