| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 | 1373 |
| 1374 void TestingAutomationProvider::OpenNewBrowserWindowOfType( | 1374 void TestingAutomationProvider::OpenNewBrowserWindowOfType( |
| 1375 int type, bool show, IPC::Message* reply_message) { | 1375 int type, bool show, IPC::Message* reply_message) { |
| 1376 new BrowserOpenedNotificationObserver(this, reply_message); | 1376 new BrowserOpenedNotificationObserver(this, reply_message); |
| 1377 // We may have no current browser windows open so don't rely on | 1377 // We may have no current browser windows open so don't rely on |
| 1378 // asking an existing browser to execute the IDC_NEWWINDOW command | 1378 // asking an existing browser to execute the IDC_NEWWINDOW command |
| 1379 Browser* browser = new Browser(static_cast<Browser::Type>(type), profile_); | 1379 Browser* browser = new Browser(static_cast<Browser::Type>(type), profile_); |
| 1380 browser->InitBrowserWindow(); | 1380 browser->InitBrowserWindow(); |
| 1381 browser->AddBlankTab(true); | 1381 browser->AddBlankTab(true); |
| 1382 if (show) | 1382 if (show) |
| 1383 browser->window()->Show(); | 1383 browser->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL); |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 void TestingAutomationProvider::GetWindowForBrowser(int browser_handle, | 1386 void TestingAutomationProvider::GetWindowForBrowser(int browser_handle, |
| 1387 bool* success, | 1387 bool* success, |
| 1388 int* handle) { | 1388 int* handle) { |
| 1389 *success = false; | 1389 *success = false; |
| 1390 *handle = 0; | 1390 *handle = 0; |
| 1391 | 1391 |
| 1392 if (browser_tracker_->ContainsHandle(browser_handle)) { | 1392 if (browser_tracker_->ContainsHandle(browser_handle)) { |
| 1393 Browser* browser = browser_tracker_->GetResource(browser_handle); | 1393 Browser* browser = browser_tracker_->GetResource(browser_handle); |
| (...skipping 4937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6331 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); | 6331 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); |
| 6332 | 6332 |
| 6333 Send(reply_message_); | 6333 Send(reply_message_); |
| 6334 redirect_query_ = 0; | 6334 redirect_query_ = 0; |
| 6335 reply_message_ = NULL; | 6335 reply_message_ = NULL; |
| 6336 } | 6336 } |
| 6337 | 6337 |
| 6338 void TestingAutomationProvider::OnRemoveProvider() { | 6338 void TestingAutomationProvider::OnRemoveProvider() { |
| 6339 AutomationProviderList::GetInstance()->RemoveProvider(this); | 6339 AutomationProviderList::GetInstance()->RemoveProvider(this); |
| 6340 } | 6340 } |
| OLD | NEW |