| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "app/message_box_flags.h" | 9 #include "app/message_box_flags.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (initial_loads_complete_) | 359 if (initial_loads_complete_) |
| 360 Send(new AutomationMsg_InitialLoadsComplete(0)); | 360 Send(new AutomationMsg_InitialLoadsComplete(0)); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void AutomationProvider::OnMessageReceived(const IPC::Message& message) { | 363 void AutomationProvider::OnMessageReceived(const IPC::Message& message) { |
| 364 IPC_BEGIN_MESSAGE_MAP(AutomationProvider, message) | 364 IPC_BEGIN_MESSAGE_MAP(AutomationProvider, message) |
| 365 #if !defined(OS_MACOSX) | 365 #if !defined(OS_MACOSX) |
| 366 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WindowDrag, | 366 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WindowDrag, |
| 367 WindowSimulateDrag) | 367 WindowSimulateDrag) |
| 368 #endif // !defined(OS_MACOSX) | 368 #endif // !defined(OS_MACOSX) |
| 369 #if defined(OS_WIN) | |
| 370 IPC_MESSAGE_HANDLER(AutomationMsg_TabHWND, GetTabHWND) | |
| 371 #endif // defined(OS_WIN) | |
| 372 IPC_MESSAGE_HANDLER(AutomationMsg_HandleUnused, HandleUnused) | 369 IPC_MESSAGE_HANDLER(AutomationMsg_HandleUnused, HandleUnused) |
| 373 IPC_MESSAGE_HANDLER(AutomationMsg_SetProxyConfig, SetProxyConfig); | 370 IPC_MESSAGE_HANDLER(AutomationMsg_SetProxyConfig, SetProxyConfig); |
| 374 IPC_MESSAGE_HANDLER(AutomationMsg_PrintAsync, PrintAsync) | 371 IPC_MESSAGE_HANDLER(AutomationMsg_PrintAsync, PrintAsync) |
| 375 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_Find, HandleFindRequest) | 372 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_Find, HandleFindRequest) |
| 376 IPC_MESSAGE_HANDLER(AutomationMsg_OverrideEncoding, OverrideEncoding) | 373 IPC_MESSAGE_HANDLER(AutomationMsg_OverrideEncoding, OverrideEncoding) |
| 377 IPC_MESSAGE_HANDLER(AutomationMsg_SelectAll, SelectAll) | 374 IPC_MESSAGE_HANDLER(AutomationMsg_SelectAll, SelectAll) |
| 378 IPC_MESSAGE_HANDLER(AutomationMsg_Cut, Cut) | 375 IPC_MESSAGE_HANDLER(AutomationMsg_Cut, Cut) |
| 379 IPC_MESSAGE_HANDLER(AutomationMsg_Copy, Copy) | 376 IPC_MESSAGE_HANDLER(AutomationMsg_Copy, Copy) |
| 380 IPC_MESSAGE_HANDLER(AutomationMsg_Paste, Paste) | 377 IPC_MESSAGE_HANDLER(AutomationMsg_Paste, Paste) |
| 381 IPC_MESSAGE_HANDLER(AutomationMsg_ReloadAsync, ReloadAsync) | 378 IPC_MESSAGE_HANDLER(AutomationMsg_ReloadAsync, ReloadAsync) |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 } | 1014 } |
| 1018 } | 1015 } |
| 1019 } | 1016 } |
| 1020 | 1017 |
| 1021 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1018 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1022 NavigationController* tab = NULL; | 1019 NavigationController* tab = NULL; |
| 1023 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1020 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 1024 if (tab_contents) | 1021 if (tab_contents) |
| 1025 tab_contents->OnSavePage(); | 1022 tab_contents->OnSavePage(); |
| 1026 } | 1023 } |
| OLD | NEW |