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(bool show) { | 488 bool AutomationProxy::OpenNewBrowserWindow(BrowserProxy::Type type, |
489 return Send(new AutomationMsg_OpenNewBrowserWindow(0, show)); | 489 bool show) { |
| 490 if (type == BrowserProxy::TYPE_NORMAL) |
| 491 return Send(new AutomationMsg_OpenNewBrowserWindow(0, show)); |
| 492 return Send( |
| 493 new AutomationMsg_OpenNewBrowserWindowOfType(0, static_cast<int>(type), |
| 494 show)); |
490 } | 495 } |
491 | 496 |
492 scoped_refptr<TabProxy> AutomationProxy::CreateExternalTab( | 497 scoped_refptr<TabProxy> AutomationProxy::CreateExternalTab( |
493 const IPC::ExternalTabSettings& settings, | 498 const IPC::ExternalTabSettings& settings, |
494 gfx::NativeWindow* external_tab_container, | 499 gfx::NativeWindow* external_tab_container, |
495 gfx::NativeWindow* tab) { | 500 gfx::NativeWindow* tab) { |
496 int handle = 0; | 501 int handle = 0; |
497 bool succeeded = | 502 bool succeeded = |
498 Send(new AutomationMsg_CreateExternalTab(0, settings, | 503 Send(new AutomationMsg_CreateExternalTab(0, settings, |
499 external_tab_container, | 504 external_tab_container, |
(...skipping 22 matching lines...) Expand all Loading... |
522 if (!p) { | 527 if (!p) { |
523 p = new T(this, tracker_.get(), handle); | 528 p = new T(this, tracker_.get(), handle); |
524 p->AddRef(); | 529 p->AddRef(); |
525 } | 530 } |
526 | 531 |
527 // Since there is no scoped_refptr::attach. | 532 // Since there is no scoped_refptr::attach. |
528 scoped_refptr<T> result; | 533 scoped_refptr<T> result; |
529 result.swap(&p); | 534 result.swap(&p); |
530 return result; | 535 return result; |
531 } | 536 } |
OLD | NEW |