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

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

Issue 115740: Move download shelf from per-tab to per-window (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 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/browser_proxy.h ('k') | chrome/test/automation/tab_proxy.h » ('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/browser_proxy.h" 5 #include "chrome/test/automation/browser_proxy.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/platform_thread.h" 10 #include "base/platform_thread.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 if (!is_visible || !is_animating) { 321 if (!is_visible || !is_animating) {
322 NOTREACHED(); 322 NOTREACHED();
323 return false; 323 return false;
324 } 324 }
325 325
326 return sender_->Send(new AutomationMsg_BookmarkBarVisibility( 326 return sender_->Send(new AutomationMsg_BookmarkBarVisibility(
327 0, handle_, is_visible, is_animating)); 327 0, handle_, is_visible, is_animating));
328 } 328 }
329 329
330 bool BrowserProxy::IsShelfVisible(bool* is_visible) {
331 if (!is_valid())
332 return false;
333
334 if (!is_visible) {
335 NOTREACHED();
336 return false;
337 }
338
339 return sender_->Send(new AutomationMsg_ShelfVisibility(0, handle_,
340 is_visible));
341 }
342
343 bool BrowserProxy::SetShelfVisible(bool is_visible) {
344 if (!is_valid())
345 return false;
346
347 return sender_->Send(new AutomationMsg_SetShelfVisibility(0, handle_,
348 is_visible));
349 }
350
330 bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) { 351 bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) {
331 if (!is_valid()) 352 if (!is_valid())
332 return false; 353 return false;
333 354
334 bool result = false; 355 bool result = false;
335 356
336 sender_->Send(new AutomationMsg_SetIntPreference(0, handle_, name, value, 357 sender_->Send(new AutomationMsg_SetIntPreference(0, handle_, name, value,
337 &result)); 358 &result));
338 return result; 359 return result;
339 } 360 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 int autocomplete_edit_handle = 0; 428 int autocomplete_edit_handle = 0;
408 429
409 sender_->Send(new AutomationMsg_AutocompleteEditForBrowser( 430 sender_->Send(new AutomationMsg_AutocompleteEditForBrowser(
410 0, handle_, &handle_ok, &autocomplete_edit_handle)); 431 0, handle_, &handle_ok, &autocomplete_edit_handle));
411 432
412 if (!handle_ok) 433 if (!handle_ok)
413 return NULL; 434 return NULL;
414 435
415 AutocompleteEditProxy* p = static_cast<AutocompleteEditProxy*>( 436 AutocompleteEditProxy* p = static_cast<AutocompleteEditProxy*>(
416 tracker_->GetResource(autocomplete_edit_handle)); 437 tracker_->GetResource(autocomplete_edit_handle));
417 438
418 if (!p) { 439 if (!p) {
419 p = new AutocompleteEditProxy(sender_, tracker_, autocomplete_edit_handle); 440 p = new AutocompleteEditProxy(sender_, tracker_, autocomplete_edit_handle);
420 p->AddRef(); 441 p->AddRef();
421 } 442 }
422 443
423 // Since there is no scoped_refptr::attach. 444 // Since there is no scoped_refptr::attach.
424 scoped_refptr<AutocompleteEditProxy> result; 445 scoped_refptr<AutocompleteEditProxy> result;
425 result.swap(&p); 446 result.swap(&p);
426 return result; 447 return result;
427 } 448 }
OLDNEW
« no previous file with comments | « chrome/test/automation/browser_proxy.h ('k') | chrome/test/automation/tab_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698