OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 #include "content/browser/tab_contents/tab_contents_view.h" | 89 #include "content/browser/tab_contents/tab_contents_view.h" |
90 #include "content/common/json_value_serializer.h" | 90 #include "content/common/json_value_serializer.h" |
91 #include "content/common/view_messages.h" | 91 #include "content/common/view_messages.h" |
92 #include "net/proxy/proxy_config_service_fixed.h" | 92 #include "net/proxy/proxy_config_service_fixed.h" |
93 #include "net/proxy/proxy_service.h" | 93 #include "net/proxy/proxy_service.h" |
94 #include "net/url_request/url_request_context.h" | 94 #include "net/url_request/url_request_context.h" |
95 #include "net/url_request/url_request_context_getter.h" | 95 #include "net/url_request/url_request_context_getter.h" |
96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
97 #include "webkit/glue/password_form.h" | 97 #include "webkit/glue/password_form.h" |
98 | 98 |
99 #if defined(OS_WIN) | 99 #if defined(OS_WIN) && !defined(USE_AURA) |
100 #include "chrome/browser/external_tab_container_win.h" | 100 #include "chrome/browser/external_tab_container_win.h" |
101 #endif // defined(OS_WIN) | 101 #endif // defined(OS_WIN) |
102 | 102 |
103 using WebKit::WebFindOptions; | 103 using WebKit::WebFindOptions; |
104 using base::Time; | 104 using base::Time; |
105 | 105 |
106 AutomationProvider::AutomationProvider(Profile* profile) | 106 AutomationProvider::AutomationProvider(Profile* profile) |
107 : profile_(profile), | 107 : profile_(profile), |
108 reply_message_(NULL), | 108 reply_message_(NULL), |
109 reinitialize_on_channel_error_( | 109 reinitialize_on_channel_error_( |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 AutomationMsg_ExecuteExtensionActionInActiveTabAsync, | 355 AutomationMsg_ExecuteExtensionActionInActiveTabAsync, |
356 ExecuteExtensionActionInActiveTabAsync) | 356 ExecuteExtensionActionInActiveTabAsync) |
357 IPC_MESSAGE_HANDLER(AutomationMsg_MoveExtensionBrowserAction, | 357 IPC_MESSAGE_HANDLER(AutomationMsg_MoveExtensionBrowserAction, |
358 MoveExtensionBrowserAction) | 358 MoveExtensionBrowserAction) |
359 IPC_MESSAGE_HANDLER(AutomationMsg_GetExtensionProperty, | 359 IPC_MESSAGE_HANDLER(AutomationMsg_GetExtensionProperty, |
360 GetExtensionProperty) | 360 GetExtensionProperty) |
361 IPC_MESSAGE_HANDLER(AutomationMsg_SaveAsAsync, SaveAsAsync) | 361 IPC_MESSAGE_HANDLER(AutomationMsg_SaveAsAsync, SaveAsAsync) |
362 IPC_MESSAGE_HANDLER(AutomationMsg_RemoveBrowsingData, RemoveBrowsingData) | 362 IPC_MESSAGE_HANDLER(AutomationMsg_RemoveBrowsingData, RemoveBrowsingData) |
363 IPC_MESSAGE_HANDLER(AutomationMsg_JavaScriptStressTestControl, | 363 IPC_MESSAGE_HANDLER(AutomationMsg_JavaScriptStressTestControl, |
364 JavaScriptStressTestControl) | 364 JavaScriptStressTestControl) |
365 #if defined(OS_WIN) | 365 #if defined(OS_WIN) && !defined(USE_AURA) |
366 // These are for use with external tabs. | 366 // These are for use with external tabs. |
367 IPC_MESSAGE_HANDLER(AutomationMsg_CreateExternalTab, CreateExternalTab) | 367 IPC_MESSAGE_HANDLER(AutomationMsg_CreateExternalTab, CreateExternalTab) |
368 IPC_MESSAGE_HANDLER(AutomationMsg_ProcessUnhandledAccelerator, | 368 IPC_MESSAGE_HANDLER(AutomationMsg_ProcessUnhandledAccelerator, |
369 ProcessUnhandledAccelerator) | 369 ProcessUnhandledAccelerator) |
370 IPC_MESSAGE_HANDLER(AutomationMsg_SetInitialFocus, SetInitialFocus) | 370 IPC_MESSAGE_HANDLER(AutomationMsg_SetInitialFocus, SetInitialFocus) |
371 IPC_MESSAGE_HANDLER(AutomationMsg_TabReposition, OnTabReposition) | 371 IPC_MESSAGE_HANDLER(AutomationMsg_TabReposition, OnTabReposition) |
372 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardContextMenuCommandToChrome, | 372 IPC_MESSAGE_HANDLER(AutomationMsg_ForwardContextMenuCommandToChrome, |
373 OnForwardContextMenuCommandToChrome) | 373 OnForwardContextMenuCommandToChrome) |
374 IPC_MESSAGE_HANDLER(AutomationMsg_NavigateInExternalTab, | 374 IPC_MESSAGE_HANDLER(AutomationMsg_NavigateInExternalTab, |
375 NavigateInExternalTab) | 375 NavigateInExternalTab) |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 } | 959 } |
960 } | 960 } |
961 } | 961 } |
962 | 962 |
963 void AutomationProvider::SaveAsAsync(int tab_handle) { | 963 void AutomationProvider::SaveAsAsync(int tab_handle) { |
964 NavigationController* tab = NULL; | 964 NavigationController* tab = NULL; |
965 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 965 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
966 if (tab_contents) | 966 if (tab_contents) |
967 tab_contents->OnSavePage(); | 967 tab_contents->OnSavePage(); |
968 } | 968 } |
OLD | NEW |