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 #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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 else | 256 else |
257 return IPC::Channel::MODE_CLIENT; | 257 return IPC::Channel::MODE_CLIENT; |
258 } | 258 } |
259 | 259 |
260 std::string AutomationProvider::GetProtocolVersion() { | 260 std::string AutomationProvider::GetProtocolVersion() { |
261 chrome::VersionInfo version_info; | 261 chrome::VersionInfo version_info; |
262 return version_info.Version().c_str(); | 262 return version_info.Version().c_str(); |
263 } | 263 } |
264 | 264 |
265 void AutomationProvider::SetExpectedTabCount(size_t expected_tabs) { | 265 void AutomationProvider::SetExpectedTabCount(size_t expected_tabs) { |
| 266 VLOG(2) << "SetExpectedTabCount:" << expected_tabs; |
266 if (expected_tabs == 0) | 267 if (expected_tabs == 0) |
267 OnInitialTabLoadsComplete(); | 268 OnInitialTabLoadsComplete(); |
268 else | 269 else |
269 initial_load_observer_.reset(new InitialLoadObserver(expected_tabs, this)); | 270 initial_load_observer_.reset(new InitialLoadObserver(expected_tabs, this)); |
270 } | 271 } |
271 | 272 |
272 void AutomationProvider::OnInitialTabLoadsComplete() { | 273 void AutomationProvider::OnInitialTabLoadsComplete() { |
273 initial_tab_loads_complete_ = true; | 274 initial_tab_loads_complete_ = true; |
274 VLOG(2) << "OnInitialTabLoadsComplete"; | 275 VLOG(2) << "OnInitialTabLoadsComplete"; |
275 SendInitialLoadMessage(); | 276 SendInitialLoadMessage(); |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 } | 1012 } |
1012 } | 1013 } |
1013 } | 1014 } |
1014 | 1015 |
1015 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1016 void AutomationProvider::SaveAsAsync(int tab_handle) { |
1016 NavigationController* tab = NULL; | 1017 NavigationController* tab = NULL; |
1017 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); | 1018 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); |
1018 if (web_contents) | 1019 if (web_contents) |
1019 web_contents->OnSavePage(); | 1020 web_contents->OnSavePage(); |
1020 } | 1021 } |
OLD | NEW |