A little more automation provider cleanup.
Intention is to make it easier to see what needs porting.
BUG=44695
TEST=trybots
Review URL: http://codereview.chromium.org/2757009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49700 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index de32396..21a7614 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -521,15 +521,9 @@
IPC_MESSAGE_HANDLER(AutomationMsg_ShutdownSessionService,
ShutdownSessionService)
IPC_MESSAGE_HANDLER(AutomationMsg_SaveAsAsync, SaveAsAsync)
-#if defined(OS_WIN)
- IPC_MESSAGE_HANDLER(AutomationMsg_BrowserMove, OnBrowserMoved)
-#endif
IPC_MESSAGE_HANDLER(AutomationMsg_SetContentSetting, SetContentSetting)
-#if defined(OS_CHROMEOS)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_LoginWithUserAndPass,
- LoginWithUserAndPass)
-#endif
IPC_MESSAGE_HANDLER(AutomationMsg_RemoveBrowsingData, RemoveBrowsingData)
+ IPC_MESSAGE_HANDLER(AutomationMsg_ResetToDefaultTheme, ResetToDefaultTheme)
#if defined(TOOLKIT_VIEWS)
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WaitForFocusedViewIDToChange,
WaitForFocusedViewIDToChange)
@@ -537,8 +531,7 @@
StartTrackingPopupMenus)
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WaitForPopupMenuToOpen,
WaitForPopupMenuToOpen)
-#endif
- IPC_MESSAGE_HANDLER(AutomationMsg_ResetToDefaultTheme, ResetToDefaultTheme)
+#endif // defined(TOOLKIT_VIEWS)
#if defined(OS_WIN)
// These are for use with external tabs.
IPC_MESSAGE_HANDLER(AutomationMsg_CreateExternalTab, CreateExternalTab)
@@ -557,7 +550,12 @@
SetEnableExtensionAutomation)
IPC_MESSAGE_HANDLER(AutomationMsg_HandleMessageFromExternalHost,
OnMessageFromExternalHost)
-#endif
+ IPC_MESSAGE_HANDLER(AutomationMsg_BrowserMove, OnBrowserMoved)
+#endif // defined(OS_WIN)
+#if defined(OS_CHROMEOS)
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_LoginWithUserAndPass,
+ LoginWithUserAndPass)
+#endif // defined(OS_CHROMEOS)
IPC_END_MESSAGE_MAP()
}
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index d95ee98..bd37a4b 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -249,22 +249,12 @@
void SetProxyConfig(const std::string& new_proxy_config);
void IsFullscreen(int handle, bool* is_fullscreen);
void GetFullscreenBubbleVisibility(int handle, bool* is_visible);
-#if defined(OS_WIN)
- void OnBrowserMoved(int handle);
-#endif
void SetContentSetting(int handle,
const std::string& host,
ContentSettingsType content_type,
ContentSetting setting,
bool* success);
-#if defined(OS_WIN)
- void ScheduleMouseEvent(views::View* view,
- views::Event::EventType type,
- const gfx::Point& point,
- int flags);
-#endif // defined(OS_WIN)
-
void GetFocusedViewID(int handle, int* view_id);
// Helper function to find the browser window that contains a given
@@ -770,8 +760,10 @@
const std::string& origin,
const std::string& target);
+ void OnBrowserMoved(int handle);
+
ExternalTabContainer* GetExternalTabForHandle(int handle);
-#endif
+#endif // defined(OS_WIN)
typedef ObserverList<NotificationObserver> NotificationObserverList;
typedef std::map<NavigationController*, LoginHandler*> LoginHandlerMap;
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index acc7a16..89345f07 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -132,14 +132,6 @@
DISALLOW_COPY_AND_ASSIGN(MouseEventTask);
};
-void AutomationProvider::ScheduleMouseEvent(views::View* view,
- views::Event::EventType type,
- const gfx::Point& point,
- int flags) {
- MessageLoop::current()->PostTask(FROM_HERE,
- new MouseEventTask(view, type, point, flags));
-}
-
// This task sends a WindowDragResponse message with the appropriate
// routing ID to the automation proxy. This is implemented as a task so that
// we know that the mouse events (and any tasks that they spawn on the message