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

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

Issue 149233: Adds a way to set the boundaries of the browser window through... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/automation/window_proxy.h ('k') | chrome/test/startup/feature_startup_test.cc » ('j') | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 bool result = false; 100 bool result = false;
101 101
102 sender_->SendWithTimeout(new AutomationMsg_WindowViewBounds( 102 sender_->SendWithTimeout(new AutomationMsg_WindowViewBounds(
103 0, handle_, view_id, screen_coordinates, &result, bounds), 103 0, handle_, view_id, screen_coordinates, &result, bounds),
104 timeout_ms, is_timeout); 104 timeout_ms, is_timeout);
105 105
106 return result; 106 return result;
107 } 107 }
108 108
109 bool WindowProxy::SetBounds(const gfx::Rect& bounds) {
110 if (!is_valid())
111 return false;
112 bool result = false;
113 sender_->Send(new AutomationMsg_SetWindowBounds(0, handle_, bounds,
114 &result));
115 return result;
116 }
117
109 bool WindowProxy::GetFocusedViewID(int* view_id) { 118 bool WindowProxy::GetFocusedViewID(int* view_id) {
110 if (!is_valid()) return false; 119 if (!is_valid()) return false;
111 120
112 if (!view_id) { 121 if (!view_id) {
113 NOTREACHED(); 122 NOTREACHED();
114 return false; 123 return false;
115 } 124 }
116 125
117 return sender_->Send(new AutomationMsg_GetFocusedViewID(0, handle_, 126 return sender_->Send(new AutomationMsg_GetFocusedViewID(0, handle_,
118 view_id)); 127 view_id));
(...skipping 21 matching lines...) Expand all
140 if (!browser) { 149 if (!browser) {
141 browser = new BrowserProxy(sender_, tracker_, browser_handle); 150 browser = new BrowserProxy(sender_, tracker_, browser_handle);
142 browser->AddRef(); 151 browser->AddRef();
143 } 152 }
144 153
145 // Since there is no scoped_refptr::attach. 154 // Since there is no scoped_refptr::attach.
146 scoped_refptr<BrowserProxy> result; 155 scoped_refptr<BrowserProxy> result;
147 result.swap(&browser); 156 result.swap(&browser);
148 return result; 157 return result;
149 } 158 }
OLDNEW
« no previous file with comments | « chrome/test/automation/window_proxy.h ('k') | chrome/test/startup/feature_startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698