| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 #include "webkit/glue/password_form.h" | 96 #include "webkit/glue/password_form.h" |
| 97 | 97 |
| 98 #if defined(OS_WIN) && !defined(USE_AURA) | 98 #if defined(OS_WIN) && !defined(USE_AURA) |
| 99 #include "chrome/browser/external_tab_container_win.h" | 99 #include "chrome/browser/external_tab_container_win.h" |
| 100 #endif // defined(OS_WIN) | 100 #endif // defined(OS_WIN) |
| 101 | 101 |
| 102 #if defined(OS_CHROMEOS) | 102 #if defined(OS_CHROMEOS) |
| 103 #include "chrome/browser/chromeos/login/user_manager.h" | 103 #include "chrome/browser/chromeos/login/user_manager.h" |
| 104 #endif // defined(OS_CHROMEOS) | 104 #endif // defined(OS_CHROMEOS) |
| 105 | 105 |
| 106 using content::BrowserThread; |
| 106 using WebKit::WebFindOptions; | 107 using WebKit::WebFindOptions; |
| 107 using base::Time; | 108 using base::Time; |
| 108 | 109 |
| 109 AutomationProvider::AutomationProvider(Profile* profile) | 110 AutomationProvider::AutomationProvider(Profile* profile) |
| 110 : profile_(profile), | 111 : profile_(profile), |
| 111 reply_message_(NULL), | 112 reply_message_(NULL), |
| 112 reinitialize_on_channel_error_( | 113 reinitialize_on_channel_error_( |
| 113 CommandLine::ForCurrentProcess()->HasSwitch( | 114 CommandLine::ForCurrentProcess()->HasSwitch( |
| 114 switches::kAutomationReinitializeOnChannelError)), | 115 switches::kAutomationReinitializeOnChannelError)), |
| 115 is_connected_(false), | 116 is_connected_(false), |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 } | 1015 } |
| 1015 } | 1016 } |
| 1016 } | 1017 } |
| 1017 | 1018 |
| 1018 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1019 void AutomationProvider::SaveAsAsync(int tab_handle) { |
| 1019 NavigationController* tab = NULL; | 1020 NavigationController* tab = NULL; |
| 1020 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1021 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
| 1021 if (tab_contents) | 1022 if (tab_contents) |
| 1022 tab_contents->OnSavePage(); | 1023 tab_contents->OnSavePage(); |
| 1023 } | 1024 } |
| OLD | NEW |