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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "chrome/test/automation/automation_proxy.h" | 7 #include "chrome/test/automation/automation_proxy.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 void AutomationProxy::InvalidateHandle(const IPC::Message& message) { | 479 void AutomationProxy::InvalidateHandle(const IPC::Message& message) { |
480 void* iter = NULL; | 480 void* iter = NULL; |
481 int handle; | 481 int handle; |
482 | 482 |
483 if (message.ReadInt(&iter, &handle)) { | 483 if (message.ReadInt(&iter, &handle)) { |
484 tracker_->InvalidateHandle(handle); | 484 tracker_->InvalidateHandle(handle); |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 bool AutomationProxy::OpenNewBrowserWindow(BrowserProxy::Type type, | 488 bool AutomationProxy::OpenNewBrowserWindow(bool show) { |
489 bool show) { | 489 return Send(new AutomationMsg_OpenNewBrowserWindow(0, show)); |
490 return Send(new AutomationMsg_OpenNewBrowserWindow(0, static_cast<int>(type), | |
491 show)); | |
492 } | 490 } |
493 | 491 |
494 scoped_refptr<TabProxy> AutomationProxy::CreateExternalTab( | 492 scoped_refptr<TabProxy> AutomationProxy::CreateExternalTab( |
495 const IPC::ExternalTabSettings& settings, | 493 const IPC::ExternalTabSettings& settings, |
496 gfx::NativeWindow* external_tab_container, | 494 gfx::NativeWindow* external_tab_container, |
497 gfx::NativeWindow* tab) { | 495 gfx::NativeWindow* tab) { |
498 int handle = 0; | 496 int handle = 0; |
499 bool succeeded = | 497 bool succeeded = |
500 Send(new AutomationMsg_CreateExternalTab(0, settings, | 498 Send(new AutomationMsg_CreateExternalTab(0, settings, |
501 external_tab_container, | 499 external_tab_container, |
(...skipping 22 matching lines...) Expand all Loading... |
524 if (!p) { | 522 if (!p) { |
525 p = new T(this, tracker_.get(), handle); | 523 p = new T(this, tracker_.get(), handle); |
526 p->AddRef(); | 524 p->AddRef(); |
527 } | 525 } |
528 | 526 |
529 // Since there is no scoped_refptr::attach. | 527 // Since there is no scoped_refptr::attach. |
530 scoped_refptr<T> result; | 528 scoped_refptr<T> result; |
531 result.swap(&p); | 529 result.swap(&p); |
532 return result; | 530 return result; |
533 } | 531 } |
OLD | NEW |