| 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 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #endif // defined(OS_CHROMEOS) | 33 #endif // defined(OS_CHROMEOS) |
| 34 | 34 |
| 35 class AutofillProfile; | 35 class AutofillProfile; |
| 36 class CreditCard; | 36 class CreditCard; |
| 37 class ImporterList; | 37 class ImporterList; |
| 38 | 38 |
| 39 namespace base { | 39 namespace base { |
| 40 class DictionaryValue; | 40 class DictionaryValue; |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace content { |
| 44 class RenderViewHost; |
| 45 } |
| 46 |
| 43 namespace webkit { | 47 namespace webkit { |
| 44 struct WebPluginInfo; | 48 struct WebPluginInfo; |
| 45 } | 49 } |
| 46 | 50 |
| 47 // This is an automation provider containing testing calls. | 51 // This is an automation provider containing testing calls. |
| 48 class TestingAutomationProvider : public AutomationProvider, | 52 class TestingAutomationProvider : public AutomationProvider, |
| 49 public BrowserList::Observer, | 53 public BrowserList::Observer, |
| 50 public importer::ImporterListObserver, | 54 public importer::ImporterListObserver, |
| 51 public content::NotificationObserver { | 55 public content::NotificationObserver { |
| 52 public: | 56 public: |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 // Login. | 1436 // Login. |
| 1433 void GetLoginInfo(base::DictionaryValue* args, IPC::Message* reply_message); | 1437 void GetLoginInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1434 | 1438 |
| 1435 void ShowCreateAccountUI(base::DictionaryValue* args, | 1439 void ShowCreateAccountUI(base::DictionaryValue* args, |
| 1436 IPC::Message* reply_message); | 1440 IPC::Message* reply_message); |
| 1437 | 1441 |
| 1438 void LoginAsGuest(base::DictionaryValue* args, IPC::Message* reply_message); | 1442 void LoginAsGuest(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1439 | 1443 |
| 1440 void Login(base::DictionaryValue* args, IPC::Message* reply_message); | 1444 void Login(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1441 | 1445 |
| 1446 // Executes javascript in the specified frame in the OOBE WebUI on chromeos. |
| 1447 // Waits for a result from the |DOMAutomationController|. The javascript must |
| 1448 // send a string. Must be run before a user has logged in. |
| 1449 // Example: |
| 1450 // input: { "frame_xpath": "//frames[1]", |
| 1451 // "javascript": |
| 1452 // "window.domAutomationController.send(window.name)", |
| 1453 // } |
| 1454 // output: { "result": "My Window Name" } |
| 1455 void ExecuteJavascriptInOOBEWebUI( |
| 1456 base::DictionaryValue* args, IPC::Message* reply_message); |
| 1457 |
| 1442 // Screen locker. | 1458 // Screen locker. |
| 1443 void LockScreen(base::DictionaryValue* args, IPC::Message* reply_message); | 1459 void LockScreen(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1444 | 1460 |
| 1445 void UnlockScreen(base::DictionaryValue* args, IPC::Message* reply_message); | 1461 void UnlockScreen(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1446 | 1462 |
| 1447 void SignoutInScreenLocker(base::DictionaryValue* args, | 1463 void SignoutInScreenLocker(base::DictionaryValue* args, |
| 1448 IPC::Message* reply_message); | 1464 IPC::Message* reply_message); |
| 1449 | 1465 |
| 1450 // Battery. | 1466 // Battery. |
| 1451 void GetBatteryInfo(base::DictionaryValue* args, IPC::Message* reply_message); | 1467 void GetBatteryInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 void ResetToDefaultTheme(); | 1583 void ResetToDefaultTheme(); |
| 1568 | 1584 |
| 1569 void WaitForProcessLauncherThreadToGoIdle(IPC::Message* reply_message); | 1585 void WaitForProcessLauncherThreadToGoIdle(IPC::Message* reply_message); |
| 1570 | 1586 |
| 1571 // Gets the browser that contains the given tab. | 1587 // Gets the browser that contains the given tab. |
| 1572 void GetParentBrowserOfTab( | 1588 void GetParentBrowserOfTab( |
| 1573 int tab_handle, int* browser_handle, bool* success); | 1589 int tab_handle, int* browser_handle, bool* success); |
| 1574 | 1590 |
| 1575 void OnRemoveProvider(); // Called via PostTask | 1591 void OnRemoveProvider(); // Called via PostTask |
| 1576 | 1592 |
| 1593 // Execute Javascript in the context of a specific render view. |
| 1594 void ExecuteJavascriptInRenderViewFrame( |
| 1595 const string16& frame_xpath, const string16& script, |
| 1596 IPC::Message* reply_message, content::RenderViewHost* render_view_host); |
| 1597 |
| 1577 #if defined(TOOLKIT_VIEWS) | 1598 #if defined(TOOLKIT_VIEWS) |
| 1578 // Keep track of whether a popup menu has been opened since the last time | 1599 // Keep track of whether a popup menu has been opened since the last time |
| 1579 // that StartTrackingPopupMenus has been called. | 1600 // that StartTrackingPopupMenus has been called. |
| 1580 bool popup_menu_opened_; | 1601 bool popup_menu_opened_; |
| 1581 | 1602 |
| 1582 // A temporary object that receives a notification when a popup menu opens. | 1603 // A temporary object that receives a notification when a popup menu opens. |
| 1583 PopupMenuWaiter* popup_menu_waiter_; | 1604 PopupMenuWaiter* popup_menu_waiter_; |
| 1584 #endif // defined(TOOLKIT_VIEWS) | 1605 #endif // defined(TOOLKIT_VIEWS) |
| 1585 | 1606 |
| 1586 #if defined(OS_CHROMEOS) | 1607 #if defined(OS_CHROMEOS) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1601 ImportSettingsData import_settings_data_; | 1622 ImportSettingsData import_settings_data_; |
| 1602 | 1623 |
| 1603 // The automation event observer queue. It is lazily created when an observer | 1624 // The automation event observer queue. It is lazily created when an observer |
| 1604 // is added to avoid overhead when not needed. | 1625 // is added to avoid overhead when not needed. |
| 1605 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1626 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
| 1606 | 1627 |
| 1607 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1628 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1608 }; | 1629 }; |
| 1609 | 1630 |
| 1610 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1631 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |