| 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 5903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5914 return; | 5914 return; |
| 5915 } | 5915 } |
| 5916 if (!args->GetInteger("navigation_count", &navigation_count)) { | 5916 if (!args->GetInteger("navigation_count", &navigation_count)) { |
| 5917 AutomationJSONReply(this, reply_message) | 5917 AutomationJSONReply(this, reply_message) |
| 5918 .SendError("'navigation_count' missing or invalid"); | 5918 .SendError("'navigation_count' missing or invalid"); |
| 5919 return; | 5919 return; |
| 5920 } | 5920 } |
| 5921 new NavigationNotificationObserver( | 5921 new NavigationNotificationObserver( |
| 5922 &tab_contents->controller(), this, reply_message, | 5922 &tab_contents->controller(), this, reply_message, |
| 5923 navigation_count, false, true); | 5923 navigation_count, false, true); |
| 5924 browser->OpenURLFromTab( | 5924 browser->OpenURLFromTab(tab_contents, OpenURLParams( |
| 5925 tab_contents, GURL(url), GURL(), CURRENT_TAB, | 5925 GURL(url), content::Referrer(), CURRENT_TAB, |
| 5926 content::PAGE_TRANSITION_TYPED); | 5926 content::PAGE_TRANSITION_TYPED, false)); |
| 5927 } | 5927 } |
| 5928 | 5928 |
| 5929 void TestingAutomationProvider::ExecuteJavascriptJSON( | 5929 void TestingAutomationProvider::ExecuteJavascriptJSON( |
| 5930 DictionaryValue* args, | 5930 DictionaryValue* args, |
| 5931 IPC::Message* reply_message) { | 5931 IPC::Message* reply_message) { |
| 5932 if (SendErrorIfModalDialogActive(this, reply_message)) | 5932 if (SendErrorIfModalDialogActive(this, reply_message)) |
| 5933 return; | 5933 return; |
| 5934 | 5934 |
| 5935 string16 frame_xpath, javascript; | 5935 string16 frame_xpath, javascript; |
| 5936 std::string error; | 5936 std::string error; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6431 | 6431 |
| 6432 Send(reply_message_); | 6432 Send(reply_message_); |
| 6433 redirect_query_ = 0; | 6433 redirect_query_ = 0; |
| 6434 reply_message_ = NULL; | 6434 reply_message_ = NULL; |
| 6435 } | 6435 } |
| 6436 | 6436 |
| 6437 void TestingAutomationProvider::OnRemoveProvider() { | 6437 void TestingAutomationProvider::OnRemoveProvider() { |
| 6438 if (g_browser_process) | 6438 if (g_browser_process) |
| 6439 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6439 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6440 } | 6440 } |
| OLD | NEW |