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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 dl_item_value->SetString("file_name", | 272 dl_item_value->SetString("file_name", |
273 download->GetFileNameToReportUser().value()); | 273 download->GetFileNameToReportUser().value()); |
274 dl_item_value->SetString("full_path", | 274 dl_item_value->SetString("full_path", |
275 download->GetTargetFilePath().value()); | 275 download->GetTargetFilePath().value()); |
276 dl_item_value->SetBoolean("is_paused", download->is_paused()); | 276 dl_item_value->SetBoolean("is_paused", download->is_paused()); |
277 dl_item_value->SetBoolean("open_when_complete", | 277 dl_item_value->SetBoolean("open_when_complete", |
278 download->open_when_complete()); | 278 download->open_when_complete()); |
279 dl_item_value->SetBoolean("is_extension_install", | 279 dl_item_value->SetBoolean("is_extension_install", |
280 download->is_extension_install()); | 280 download->is_extension_install()); |
281 dl_item_value->SetBoolean("is_temporary", download->is_temporary()); | 281 dl_item_value->SetBoolean("is_temporary", download->is_temporary()); |
282 dl_item_value->SetBoolean("is_otr", download->is_otr()); // off-the-record | 282 dl_item_value->SetBoolean("is_otr", download->is_otr()); // incognito |
283 dl_item_value->SetString("state", state_to_string[download->state()]); | 283 dl_item_value->SetString("state", state_to_string[download->state()]); |
284 dl_item_value->SetString("safety_state", | 284 dl_item_value->SetString("safety_state", |
285 safety_state_to_string[download->safety_state()]); | 285 safety_state_to_string[download->safety_state()]); |
286 dl_item_value->SetInteger("PercentComplete", download->PercentComplete()); | 286 dl_item_value->SetInteger("PercentComplete", download->PercentComplete()); |
287 | 287 |
288 return dl_item_value; | 288 return dl_item_value; |
289 } | 289 } |
290 | 290 |
291 const Extension* AutomationProvider::GetExtension(int extension_handle) { | 291 const Extension* AutomationProvider::GetExtension(int extension_handle) { |
292 return extension_tracker_->GetResource(extension_handle); | 292 return extension_tracker_->GetResource(extension_handle); |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 } | 1010 } |
1011 } | 1011 } |
1012 } | 1012 } |
1013 | 1013 |
1014 void AutomationProvider::SaveAsAsync(int tab_handle) { | 1014 void AutomationProvider::SaveAsAsync(int tab_handle) { |
1015 NavigationController* tab = NULL; | 1015 NavigationController* tab = NULL; |
1016 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); | 1016 TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); |
1017 if (tab_contents) | 1017 if (tab_contents) |
1018 tab_contents->OnSavePage(); | 1018 tab_contents->OnSavePage(); |
1019 } | 1019 } |
OLD | NEW |