| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 handler_map_["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen; | 1755 handler_map_["UnlockScreen"] = &TestingAutomationProvider::UnlockScreen; |
| 1756 handler_map_["SignoutInScreenLocker"] = | 1756 handler_map_["SignoutInScreenLocker"] = |
| 1757 &TestingAutomationProvider::SignoutInScreenLocker; | 1757 &TestingAutomationProvider::SignoutInScreenLocker; |
| 1758 | 1758 |
| 1759 handler_map_["GetBatteryInfo"] = &TestingAutomationProvider::GetBatteryInfo; | 1759 handler_map_["GetBatteryInfo"] = &TestingAutomationProvider::GetBatteryInfo; |
| 1760 | 1760 |
| 1761 handler_map_["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo; | 1761 handler_map_["GetNetworkInfo"] = &TestingAutomationProvider::GetNetworkInfo; |
| 1762 handler_map_["NetworkScan"] = &TestingAutomationProvider::NetworkScan; | 1762 handler_map_["NetworkScan"] = &TestingAutomationProvider::NetworkScan; |
| 1763 handler_map_["ToggleNetworkDevice"] = | 1763 handler_map_["ToggleNetworkDevice"] = |
| 1764 &TestingAutomationProvider::ToggleNetworkDevice; | 1764 &TestingAutomationProvider::ToggleNetworkDevice; |
| 1765 handler_map_["ConnectToCellularNetwork"] = | |
| 1766 &TestingAutomationProvider::ConnectToCellularNetwork; | |
| 1767 handler_map_["DisconnectFromCellularNetwork"] = | |
| 1768 &TestingAutomationProvider::DisconnectFromCellularNetwork; | |
| 1769 handler_map_["ConnectToWifiNetwork"] = | |
| 1770 &TestingAutomationProvider::ConnectToWifiNetwork; | |
| 1771 handler_map_["ConnectToHiddenWifiNetwork"] = | 1765 handler_map_["ConnectToHiddenWifiNetwork"] = |
| 1772 &TestingAutomationProvider::ConnectToHiddenWifiNetwork; | 1766 &TestingAutomationProvider::ConnectToHiddenWifiNetwork; |
| 1773 handler_map_["DisconnectFromWifiNetwork"] = | |
| 1774 &TestingAutomationProvider::DisconnectFromWifiNetwork; | |
| 1775 handler_map_["ForgetWifiNetwork"] = | 1767 handler_map_["ForgetWifiNetwork"] = |
| 1776 &TestingAutomationProvider::ForgetWifiNetwork; | 1768 &TestingAutomationProvider::ForgetWifiNetwork; |
| 1777 | 1769 |
| 1778 handler_map_["AddPrivateNetwork"] = | |
| 1779 &TestingAutomationProvider::AddPrivateNetwork; | |
| 1780 handler_map_["GetPrivateNetworkInfo"] = | |
| 1781 &TestingAutomationProvider::GetPrivateNetworkInfo; | |
| 1782 handler_map_["ConnectToPrivateNetwork"] = | |
| 1783 &TestingAutomationProvider::ConnectToPrivateNetwork; | |
| 1784 handler_map_["DisconnectFromPrivateNetwork"] = | |
| 1785 &TestingAutomationProvider::DisconnectFromPrivateNetwork; | |
| 1786 | |
| 1787 handler_map_["EnableSpokenFeedback"] = | 1770 handler_map_["EnableSpokenFeedback"] = |
| 1788 &TestingAutomationProvider::EnableSpokenFeedback; | 1771 &TestingAutomationProvider::EnableSpokenFeedback; |
| 1789 handler_map_["IsSpokenFeedbackEnabled"] = | 1772 handler_map_["IsSpokenFeedbackEnabled"] = |
| 1790 &TestingAutomationProvider::IsSpokenFeedbackEnabled; | 1773 &TestingAutomationProvider::IsSpokenFeedbackEnabled; |
| 1791 | 1774 |
| 1792 handler_map_["GetTimeInfo"] = &TestingAutomationProvider::GetTimeInfo; | 1775 handler_map_["GetTimeInfo"] = &TestingAutomationProvider::GetTimeInfo; |
| 1793 handler_map_["SetTimezone"] = &TestingAutomationProvider::SetTimezone; | 1776 handler_map_["SetTimezone"] = &TestingAutomationProvider::SetTimezone; |
| 1794 | 1777 |
| 1795 handler_map_["UpdateCheck"] = &TestingAutomationProvider::UpdateCheck; | 1778 handler_map_["UpdateCheck"] = &TestingAutomationProvider::UpdateCheck; |
| 1796 | 1779 |
| 1797 handler_map_["GetVolumeInfo"] = &TestingAutomationProvider::GetVolumeInfo; | 1780 handler_map_["GetVolumeInfo"] = &TestingAutomationProvider::GetVolumeInfo; |
| 1798 handler_map_["SetVolume"] = &TestingAutomationProvider::SetVolume; | 1781 handler_map_["SetVolume"] = &TestingAutomationProvider::SetVolume; |
| 1799 handler_map_["SetMute"] = &TestingAutomationProvider::SetMute; | 1782 handler_map_["SetMute"] = &TestingAutomationProvider::SetMute; |
| 1800 | 1783 |
| 1801 handler_map_["OpenCrosh"] = &TestingAutomationProvider::OpenCrosh; | 1784 handler_map_["OpenCrosh"] = &TestingAutomationProvider::OpenCrosh; |
| 1802 handler_map_["SetProxySettings"] = | |
| 1803 &TestingAutomationProvider::SetProxySettings; | |
| 1804 handler_map_["SetSharedProxies"] = | |
| 1805 &TestingAutomationProvider::SetSharedProxies; | |
| 1806 | 1785 |
| 1807 browser_handler_map_["GetTimeInfo"] = | 1786 browser_handler_map_["GetTimeInfo"] = |
| 1808 &TestingAutomationProvider::GetTimeInfo; | 1787 &TestingAutomationProvider::GetTimeInfo; |
| 1809 #endif // defined(OS_CHROMEOS) | 1788 #endif // defined(OS_CHROMEOS) |
| 1810 | 1789 |
| 1811 browser_handler_map_["DisablePlugin"] = | 1790 browser_handler_map_["DisablePlugin"] = |
| 1812 &TestingAutomationProvider::DisablePlugin; | 1791 &TestingAutomationProvider::DisablePlugin; |
| 1813 browser_handler_map_["EnablePlugin"] = | 1792 browser_handler_map_["EnablePlugin"] = |
| 1814 &TestingAutomationProvider::EnablePlugin; | 1793 &TestingAutomationProvider::EnablePlugin; |
| 1815 browser_handler_map_["GetPluginsInfo"] = | 1794 browser_handler_map_["GetPluginsInfo"] = |
| (...skipping 3759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5575 if (g_browser_process) | 5554 if (g_browser_process) |
| 5576 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 5555 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 5577 } | 5556 } |
| 5578 | 5557 |
| 5579 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 5558 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
| 5580 WebContents* tab) { | 5559 WebContents* tab) { |
| 5581 TabStripModel* tab_strip = browser->tab_strip_model(); | 5560 TabStripModel* tab_strip = browser->tab_strip_model(); |
| 5582 if (tab_strip->GetActiveWebContents() != tab) | 5561 if (tab_strip->GetActiveWebContents() != tab) |
| 5583 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); | 5562 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); |
| 5584 } | 5563 } |
| OLD | NEW |