| 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_ui.h" | 5 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 source->AddResourcePath("images/third_party_fedex.png", | 384 source->AddResourcePath("images/third_party_fedex.png", |
| 385 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY_FEDEX); | 385 IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY_FEDEX); |
| 386 source->AddResourcePath("images/google_doc.png", | 386 source->AddResourcePath("images/google_doc.png", |
| 387 IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC); | 387 IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC); |
| 388 source->AddResourcePath("images/pdf.png", IDR_PRINT_PREVIEW_IMAGES_PDF); | 388 source->AddResourcePath("images/pdf.png", IDR_PRINT_PREVIEW_IMAGES_PDF); |
| 389 source->AddResourcePath("images/mobile.png", IDR_PRINT_PREVIEW_IMAGES_MOBILE); | 389 source->AddResourcePath("images/mobile.png", IDR_PRINT_PREVIEW_IMAGES_MOBILE); |
| 390 source->AddResourcePath("images/mobile_shared.png", | 390 source->AddResourcePath("images/mobile_shared.png", |
| 391 IDR_PRINT_PREVIEW_IMAGES_MOBILE_SHARED); | 391 IDR_PRINT_PREVIEW_IMAGES_MOBILE_SHARED); |
| 392 source->SetDefaultResource(IDR_PRINT_PREVIEW_HTML); | 392 source->SetDefaultResource(IDR_PRINT_PREVIEW_HTML); |
| 393 source->SetRequestFilter(base::Bind(&HandleRequestCallback)); | 393 source->SetRequestFilter(base::Bind(&HandleRequestCallback)); |
| 394 source->OverrideContentSecurityPolicyFrameSrc("frame-src 'self';"); | 394 source->OverrideContentSecurityPolicyChildSrc("child-src 'self';"); |
| 395 source->DisableDenyXFrameOptions(); | 395 source->DisableDenyXFrameOptions(); |
| 396 source->OverrideContentSecurityPolicyObjectSrc("object-src 'self';"); | 396 source->OverrideContentSecurityPolicyObjectSrc("object-src 'self';"); |
| 397 source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL); | 397 source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL); |
| 398 source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL); | 398 source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL); |
| 399 return source; | 399 return source; |
| 400 } | 400 } |
| 401 | 401 |
| 402 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL; | 402 PrintPreviewUI::TestingDelegate* g_testing_delegate = NULL; |
| 403 | 403 |
| 404 } // namespace | 404 } // namespace |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 669 } |
| 670 | 670 |
| 671 void PrintPreviewUI::SetPdfSavedClosureForTesting( | 671 void PrintPreviewUI::SetPdfSavedClosureForTesting( |
| 672 const base::Closure& closure) { | 672 const base::Closure& closure) { |
| 673 handler_->SetPdfSavedClosureForTesting(closure); | 673 handler_->SetPdfSavedClosureForTesting(closure); |
| 674 } | 674 } |
| 675 | 675 |
| 676 base::WeakPtr<PrintPreviewUI> PrintPreviewUI::GetWeakPtr() { | 676 base::WeakPtr<PrintPreviewUI> PrintPreviewUI::GetWeakPtr() { |
| 677 return weak_ptr_factory_.GetWeakPtr(); | 677 return weak_ptr_factory_.GetWeakPtr(); |
| 678 } | 678 } |
| OLD | NEW |