OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/test/automation/window_proxy.h" | 5 #include "chrome/test/automation/window_proxy.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 if (!is_valid()) return false; | 34 if (!is_valid()) return false; |
35 | 35 |
36 if (!text) { | 36 if (!text) { |
37 NOTREACHED(); | 37 NOTREACHED(); |
38 return false; | 38 return false; |
39 } | 39 } |
40 | 40 |
41 return sender_->Send(new AutomationMsg_WindowTitle(0, handle_, text)); | 41 return sender_->Send(new AutomationMsg_WindowTitle(0, handle_, text)); |
42 } | 42 } |
43 | 43 |
44 bool WindowProxy::SimulateOSKeyPress(base::KeyboardCode key, int flags) { | 44 bool WindowProxy::SimulateOSKeyPress(app::KeyboardCode key, int flags) { |
45 if (!is_valid()) return false; | 45 if (!is_valid()) return false; |
46 | 46 |
47 return sender_->Send( | 47 return sender_->Send( |
48 new AutomationMsg_WindowKeyPress(0, handle_, key, flags)); | 48 new AutomationMsg_WindowKeyPress(0, handle_, key, flags)); |
49 } | 49 } |
50 | 50 |
51 bool WindowProxy::SetVisible(bool visible) { | 51 bool WindowProxy::SetVisible(bool visible) { |
52 if (!is_valid()) return false; | 52 if (!is_valid()) return false; |
53 | 53 |
54 bool result = false; | 54 bool result = false; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 bool WindowProxy::IsMaximized(bool* maximized) { | 165 bool WindowProxy::IsMaximized(bool* maximized) { |
166 if (!is_valid()) | 166 if (!is_valid()) |
167 return false; | 167 return false; |
168 | 168 |
169 bool result = false; | 169 bool result = false; |
170 | 170 |
171 sender_->Send(new AutomationMsg_IsWindowMaximized(0, handle_, maximized, | 171 sender_->Send(new AutomationMsg_IsWindowMaximized(0, handle_, maximized, |
172 &result)); | 172 &result)); |
173 return result; | 173 return result; |
174 } | 174 } |
OLD | NEW |