| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 5576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5587 if (!old_contents) { | 5587 if (!old_contents) { |
| 5588 AutomationJSONReply(this, reply_message).SendError( | 5588 AutomationJSONReply(this, reply_message).SendError( |
| 5589 "Cannot identify selected tab contents."); | 5589 "Cannot identify selected tab contents."); |
| 5590 return; | 5590 return; |
| 5591 } | 5591 } |
| 5592 | 5592 |
| 5593 // This observer will delete itself. | 5593 // This observer will delete itself. |
| 5594 new AppLaunchObserver(&old_contents->GetController(), this, reply_message, | 5594 new AppLaunchObserver(&old_contents->GetController(), this, reply_message, |
| 5595 launch_container); | 5595 launch_container); |
| 5596 Browser::OpenApplication(profile(), extension, launch_container, GURL(), | 5596 Browser::OpenApplication(profile(), extension, launch_container, GURL(), |
| 5597 CURRENT_TAB); | 5597 CURRENT_TAB, NULL); |
| 5598 } | 5598 } |
| 5599 | 5599 |
| 5600 // Sample JSON input: { "command": "SetAppLaunchType", | 5600 // Sample JSON input: { "command": "SetAppLaunchType", |
| 5601 // "id": "ahfgeienlihckogmohjhadlkjgocpleb", | 5601 // "id": "ahfgeienlihckogmohjhadlkjgocpleb", |
| 5602 // "launch_type": "pinned" } | 5602 // "launch_type": "pinned" } |
| 5603 // Sample JSON output: {} | 5603 // Sample JSON output: {} |
| 5604 void TestingAutomationProvider::SetAppLaunchType( | 5604 void TestingAutomationProvider::SetAppLaunchType( |
| 5605 Browser* browser, | 5605 Browser* browser, |
| 5606 DictionaryValue* args, | 5606 DictionaryValue* args, |
| 5607 IPC::Message* reply_message) { | 5607 IPC::Message* reply_message) { |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6570 | 6570 |
| 6571 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( | 6571 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( |
| 6572 IPC::Message* reply_message) { | 6572 IPC::Message* reply_message) { |
| 6573 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); | 6573 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); |
| 6574 } | 6574 } |
| 6575 | 6575 |
| 6576 void TestingAutomationProvider::OnRemoveProvider() { | 6576 void TestingAutomationProvider::OnRemoveProvider() { |
| 6577 if (g_browser_process) | 6577 if (g_browser_process) |
| 6578 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6578 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6579 } | 6579 } |
| OLD | NEW |