Chromium Code Reviews| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 string16 filename; | 251 string16 filename; |
| 252 filename += date(); | 252 filename += date(); |
| 253 filename += ASCIIToUTF16("_"); | 253 filename += ASCIIToUTF16("_"); |
| 254 filename += time(); | 254 filename += time(); |
| 255 filename += ASCIIToUTF16("_"); | 255 filename += ASCIIToUTF16("_"); |
| 256 filename += name(); | 256 filename += name(); |
| 257 filename += ASCIIToUTF16("_"); | 257 filename += ASCIIToUTF16("_"); |
| 258 filename += ASCIIToUTF16(StringPrintf("%02d", page.page_number())); | 258 filename += ASCIIToUTF16(StringPrintf("%02d", page.page_number())); |
| 259 filename += ASCIIToUTF16("_.emf"); | 259 filename += ASCIIToUTF16("_.emf"); |
| 260 #if defined(OS_WIN) | 260 #if defined(OS_WIN) |
| 261 page.native_metafile()->SaveTo( | 261 page.native_metafile()->SaveTo(FilePath( |
| 262 g_debug_dump_info.Get().debug_dump_path.Append(filename).value()); | 262 g_debug_dump_info.Get().debug_dump_path.Append(filename).value())); |
|
Lei Zhang
2011/03/04 12:02:36
I haven't looked closely, but I suspect g_debug_du
dpapad
2011/03/04 19:19:43
Done.
| |
| 263 #else // OS_WIN | 263 #else // OS_WIN |
| 264 NOTIMPLEMENTED(); // TODO: convert SaveTo to accept a FilePath | 264 NOTIMPLEMENTED(); // TODO: convert SaveTo to accept a FilePath |
| 265 #endif // OS_WIN | 265 #endif // OS_WIN |
| 266 } | 266 } |
| 267 | 267 |
| 268 void PrintedDocument::set_debug_dump_path(const FilePath& debug_dump_path) { | 268 void PrintedDocument::set_debug_dump_path(const FilePath& debug_dump_path) { |
| 269 g_debug_dump_info.Get().enabled = !debug_dump_path.empty(); | 269 g_debug_dump_info.Get().enabled = !debug_dump_path.empty(); |
| 270 g_debug_dump_info.Get().debug_dump_path = debug_dump_path; | 270 g_debug_dump_info.Get().debug_dump_path = debug_dump_path; |
| 271 } | 271 } |
| 272 | 272 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 292 name_(source->RenderSourceName()), | 292 name_(source->RenderSourceName()), |
| 293 url_(source->RenderSourceUrl()), | 293 url_(source->RenderSourceUrl()), |
| 294 cookie_(cookie) { | 294 cookie_(cookie) { |
| 295 SetDocumentDate(); | 295 SetDocumentDate(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 PrintedDocument::Immutable::~Immutable() { | 298 PrintedDocument::Immutable::~Immutable() { |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace printing | 301 } // namespace printing |
| OLD | NEW |