| 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/ui/webui/print_preview/print_preview_handler.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 { | 354 { |
| 355 Color standard_color(STANDARD_COLOR); | 355 Color standard_color(STANDARD_COLOR); |
| 356 standard_color.vendor_id = base::IntToString(printing::COLOR); | 356 standard_color.vendor_id = base::IntToString(printing::COLOR); |
| 357 color.AddDefaultOption(standard_color, true); | 357 color.AddDefaultOption(standard_color, true); |
| 358 } | 358 } |
| 359 color.SaveTo(&description); | 359 color.SaveTo(&description); |
| 360 | 360 |
| 361 static const cloud_devices::printer::MediaType kPdfMedia[] = { | 361 static const cloud_devices::printer::MediaType kPdfMedia[] = { |
| 362 ISO_A4, | 362 ISO_A4, |
| 363 ISO_A3, | 363 ISO_A3, |
| 364 ISO_A0, |
| 364 NA_LETTER, | 365 NA_LETTER, |
| 365 NA_LEGAL, | 366 NA_LEGAL, |
| 366 NA_LEDGER | 367 NA_LEDGER |
| 367 }; | 368 }; |
| 368 const gfx::Size default_media_size = GetDefaultPdfMediaSizeMicrons(); | 369 const gfx::Size default_media_size = GetDefaultPdfMediaSizeMicrons(); |
| 369 Media default_media( | 370 Media default_media( |
| 370 "", "", default_media_size.width(), default_media_size.height()); | 371 "", "", default_media_size.width(), default_media_size.height()); |
| 371 if (!default_media.MatchBySize() || | 372 if (!default_media.MatchBySize() || |
| 372 std::find(kPdfMedia, | 373 std::find(kPdfMedia, |
| 373 kPdfMedia + arraysize(kPdfMedia), | 374 kPdfMedia + arraysize(kPdfMedia), |
| (...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1816 | 1817 |
| 1817 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { | 1818 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { |
| 1818 if (gaia_cookie_manager_service_) | 1819 if (gaia_cookie_manager_service_) |
| 1819 gaia_cookie_manager_service_->RemoveObserver(this); | 1820 gaia_cookie_manager_service_->RemoveObserver(this); |
| 1820 } | 1821 } |
| 1821 | 1822 |
| 1822 void PrintPreviewHandler::SetPdfSavedClosureForTesting( | 1823 void PrintPreviewHandler::SetPdfSavedClosureForTesting( |
| 1823 const base::Closure& closure) { | 1824 const base::Closure& closure) { |
| 1824 pdf_file_saved_closure_ = closure; | 1825 pdf_file_saved_closure_ = closure; |
| 1825 } | 1826 } |
| OLD | NEW |