| 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 "printing/printed_document.h" | 5 #include "printing/printed_document.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 base::checked_cast<int>(data->size())); | 71 base::checked_cast<int>(data->size())); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void DebugDumpSettings(const base::string16& doc_name, | 74 void DebugDumpSettings(const base::string16& doc_name, |
| 75 const PrintSettings& settings, | 75 const PrintSettings& settings, |
| 76 base::TaskRunner* blocking_runner) { | 76 base::TaskRunner* blocking_runner) { |
| 77 base::DictionaryValue job_settings; | 77 base::DictionaryValue job_settings; |
| 78 PrintSettingsToJobSettingsDebug(settings, &job_settings); | 78 PrintSettingsToJobSettingsDebug(settings, &job_settings); |
| 79 std::string settings_str; | 79 std::string settings_str; |
| 80 base::JSONWriter::WriteWithOptions( | 80 base::JSONWriter::WriteWithOptions( |
| 81 &job_settings, base::JSONWriter::OPTIONS_PRETTY_PRINT, &settings_str); | 81 job_settings, base::JSONWriter::OPTIONS_PRETTY_PRINT, &settings_str); |
| 82 scoped_refptr<base::RefCountedMemory> data = | 82 scoped_refptr<base::RefCountedMemory> data = |
| 83 base::RefCountedString::TakeString(&settings_str); | 83 base::RefCountedString::TakeString(&settings_str); |
| 84 blocking_runner->PostTask( | 84 blocking_runner->PostTask( |
| 85 FROM_HERE, | 85 FROM_HERE, |
| 86 base::Bind( | 86 base::Bind( |
| 87 &DebugDumpDataTask, doc_name, FILE_PATH_LITERAL(".json"), data)); | 87 &DebugDumpDataTask, doc_name, FILE_PATH_LITERAL(".json"), data)); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace | 90 } // namespace |
| 91 | 91 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 } | 264 } |
| 265 | 265 |
| 266 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 266 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 267 // This function is not used on aura linux/chromeos or android. | 267 // This function is not used on aura linux/chromeos or android. |
| 268 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, | 268 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, |
| 269 PrintingContext* context) const { | 269 PrintingContext* context) const { |
| 270 } | 270 } |
| 271 #endif | 271 #endif |
| 272 | 272 |
| 273 } // namespace printing | 273 } // namespace printing |
| OLD | NEW |