Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: chrome/test/automation/window_proxy.cc

Issue 27060: Make basic bits of chrome/test/automation build on Linux. (Closed)
Patch Set: use base::kNoTimeout Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/automation/window_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/gfx/rect.h" 10 #include "base/gfx/rect.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 bool WindowProxy::Activate() { 63 bool WindowProxy::Activate() {
64 if (!is_valid()) return false; 64 if (!is_valid()) return false;
65 65
66 return sender_->Send(new AutomationMsg_ActivateWindow(0, handle_)); 66 return sender_->Send(new AutomationMsg_ActivateWindow(0, handle_));
67 } 67 }
68 68
69 bool WindowProxy::GetViewBounds(int view_id, gfx::Rect* bounds, 69 bool WindowProxy::GetViewBounds(int view_id, gfx::Rect* bounds,
70 bool screen_coordinates) { 70 bool screen_coordinates) {
71 return GetViewBoundsWithTimeout(view_id, bounds, screen_coordinates, 71 return GetViewBoundsWithTimeout(view_id, bounds, screen_coordinates,
72 INFINITE, NULL); 72 base::kNoTimeout, NULL);
73 } 73 }
74 74
75 bool WindowProxy::GetViewBoundsWithTimeout(int view_id, gfx::Rect* bounds, 75 bool WindowProxy::GetViewBoundsWithTimeout(int view_id, gfx::Rect* bounds,
76 bool screen_coordinates, 76 bool screen_coordinates,
77 uint32 timeout_ms, 77 uint32 timeout_ms,
78 bool* is_timeout) { 78 bool* is_timeout) {
79 if (!is_valid()) 79 if (!is_valid())
80 return false; 80 return false;
81 81
82 if (!bounds) { 82 if (!bounds) {
(...skipping 16 matching lines...) Expand all
99 if (!view_id) { 99 if (!view_id) {
100 NOTREACHED(); 100 NOTREACHED();
101 return false; 101 return false;
102 } 102 }
103 103
104 return sender_->Send(new AutomationMsg_GetFocusedViewID(0, handle_, 104 return sender_->Send(new AutomationMsg_GetFocusedViewID(0, handle_,
105 view_id)); 105 view_id));
106 } 106 }
107 107
108 BrowserProxy* WindowProxy::GetBrowser() { 108 BrowserProxy* WindowProxy::GetBrowser() {
109 return GetBrowserWithTimeout(INFINITE, NULL); 109 return GetBrowserWithTimeout(base::kNoTimeout, NULL);
110 } 110 }
111 111
112 BrowserProxy* WindowProxy::GetBrowserWithTimeout(uint32 timeout_ms, 112 BrowserProxy* WindowProxy::GetBrowserWithTimeout(uint32 timeout_ms,
113 bool* is_timeout) { 113 bool* is_timeout) {
114 if (!is_valid()) 114 if (!is_valid())
115 return false; 115 return false;
116 116
117 bool handle_ok = false; 117 bool handle_ok = false;
118 int browser_handle = 0; 118 int browser_handle = 0;
119 119
120 sender_->Send(new AutomationMsg_BrowserForWindow(0, handle_, &handle_ok, 120 sender_->Send(new AutomationMsg_BrowserForWindow(0, handle_, &handle_ok,
121 &browser_handle)); 121 &browser_handle));
122 if (!handle_ok) 122 if (!handle_ok)
123 return NULL; 123 return NULL;
124 124
125 return new BrowserProxy(sender_, tracker_, browser_handle); 125 return new BrowserProxy(sender_, tracker_, browser_handle);
126 } 126 }
OLDNEW
« no previous file with comments | « chrome/test/automation/window_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698